While fixing the tests, you get a sense that you are wasting time by mechanically applying the same transformation to many tests.

What does it look like to write tests mechanically?

// Production code: def abs(i: Int) return (i < 0) ? i * -1 : i // Test code: for (line: String in File(prod_source).read_lines()) switch (line.number) 1: assert line.content equals def abs(i: Int) 2: assert line.content equals return (i < 0) ? i * -1 : i

That test is clearly not useful

A correct or incorrect program is equally likely to pass

// Production code: def process(w: Work) firstPart.process(w) secondPart.process(w) // Test code: part1 = mock(FirstPart) part2 = mock(SecondPart) w = Work() Processor(part1, part2).process(w) verify_in_order was_called part1.process(w) was_called part2.process(w)

This is a change-detector test

it breaks in response to any change to the production code, without verifying correct behavior

Change detectors provide negative value