refactor in JSONTest.java