Java,GUI, unit testing