We would like to thank Bill Wake for allowing us to use this article. It is the second in a series entitled "The Test/Code Cycle in XP." His website, http://users.vnet.net/wwake, contains the entire series plus a whole lot more.
People who unit-test, even many who unit-test in Extreme Programming, don't necessarily test the user interface. You can use JUnit to assist in this testing, however. This paper will work through a small but plausible example, giving the flavor of testing and programming using JUnit. This paper is part two, but can be read on its own; part one developed the model.