Fixed NullPointerException in test.java