Test.java improved