Rework JUnit tests to be sane