Use the type system to make wrong states unrepresentable, so the compiler fails the bug before a test has to.