Main.java modifications for testing