Writing unit tests REQUIRED BACKGROUND: the skill. governs which tests a change owes; this skill is the craft of the tests themselves. Overview A unit test is a behavioral claim with a name, read by the next engineer during a red build. Core principle: test the contract, not the implementation. The name carries the claim, and the test stays simple enough that it cannot itself be wrong. Contract over implementation - Test through the public contract of the unit. A refactor that preserves behavior should not break tests; when it does, the tests were asserting the implementation. - Do not assert…