Writing a test is partly an exercise in interface design. When coding test-first, the test defines the interface, because you have to decide how to call your production code before you actually write it. For our new “clear screen” button, this means that we need to decide how our production code knows which HTML element to monitor.