Java, GUI, unit testing