@Test(dataProvider = "getTestCaseNames") public void runTestCases(String testCaseName) throws IOException { if ("".equals( testCaseName )) { return; } String testPath = "/json/sortr/"+testCaseName; Map<String, Object> input = JsonUtils.classpathToMap(testPath + "/input.json"); Map<String, Object> expected = JsonUtils.classpathToMap( testPath + "/output.json" ); Sortr sortr = new Sortr(); Map<String, Object> actual = (Map<String, Object>) sortr.transform( input ); JoltTestUtil.runDiffy( "Make sure it is still the same object : " + testPath, expected, actual ); String orderErrorMessage = verifyOrder( actual, expected ); Assert.assertNull( orderErrorMessage, orderErrorMessage ); }
@Override public Object transform( Object input ) { return sortJson( input ); }
Sortr implements Transform { @Override public Object transform( Object input ) { return sortJson( input ); } }
Sortr implements Transform { @Override public Object transform( Object input ) { return sortJson( input ); }  }
Sortr implements Transform { @Override public Object transform( Object input ) { return sortJson( input ); }  @Override Object transform( Object input ); @SuppressWarnings( "unchecked" ) static Object sortJson( Object obj ); }
Sortr implements Transform { @Override public Object transform( Object input ) { return sortJson( input ); }  @Override Object transform( Object input ); @SuppressWarnings( "unchecked" ) static Object sortJson( Object obj );  }