Moved test code to Test.java