Write a test around the behavior that matters
Choose an observable result: a calculation, permission boundary or saved record. Include a meaningful failure case as well as a successful one.
Keep the test independent of unrelated implementation details. A useful test fails when behavior breaks and survives a harmless refactor.
0