ImageCollectionConfig implements ReadWriteableASCII { public ImageCollectionConfig(){ this.json = "{}"; } ImageCollectionConfig();  ImageCollectionConfig(String json); @Override void readASCII(Scanner in); @Override String asciiHeader(); @Override void writeASCII(PrintWriter out); String read(String path); boolean containsValid(String videoTag);  }
@Test public void testImageCollectionConfig() throws IOException, ParseException { final ImageCollectionConfig config = new ImageCollectionConfig(jsonConfig); assertEquals((int) config.read("$.a.inner"), 2); final ByteArrayOutputStream stream = new ByteArrayOutputStream(); IOUtils.writeASCII(stream, config); assertEquals(stream.toString(), jsonConfig); }
@Test public void testImageCollectionConfig() throws IOException, ParseException{ ImageCollectionConfig config = new ImageCollectionConfig(jsonConfig); assertEquals(config.read("$.a.inner"),2); ByteArrayOutputStream stream = new ByteArrayOutputStream(); IOUtils.writeASCII(stream, config); assertEquals(stream.toString(),jsonConfig); }