@Test public void parseIndexType() throws IOException { IndexTypeMetadata indexType = new IndexTypeMetadata("INDEX", "TYPE", fields); StringWriter writer = new StringWriter(); Workload config = new Workload(WorkloadConstants.CURRENT_VERSION, MetadataConstants.DEFAULT_META_BY_TYPE, Arrays.asList(indexType)); WorkloadParser parser = new WorkloadParser(); parser.parse(writer, config); String json = writer.toString(); LOGGER.info("\n{}", json); StringReader reader = new StringReader(json); Workload parsedConfig = parser.parse(reader); ReflectionAssert.assertReflectionEquals(config, parsedConfig, ReflectionComparatorMode.LENIENT_ORDER); }
public Workload parse(Reader reader) throws IOException { ObjectMapper mapper = MapperFactory.initMapper(); JsonNode root = mapper.readTree(reader); return parseWorkload(mapper, root); }
WorkloadParser { public Workload parse(Reader reader) throws IOException { ObjectMapper mapper = MapperFactory.initMapper(); JsonNode root = mapper.readTree(reader); return parseWorkload(mapper, root); } }
WorkloadParser { public Workload parse(Reader reader) throws IOException { ObjectMapper mapper = MapperFactory.initMapper(); JsonNode root = mapper.readTree(reader); return parseWorkload(mapper, root); }  }
WorkloadParser { public Workload parse(Reader reader) throws IOException { ObjectMapper mapper = MapperFactory.initMapper(); JsonNode root = mapper.readTree(reader); return parseWorkload(mapper, root); }  Workload parse(Reader reader); void parse(Writer writer, Workload workload); }
WorkloadParser { public Workload parse(Reader reader) throws IOException { ObjectMapper mapper = MapperFactory.initMapper(); JsonNode root = mapper.readTree(reader); return parseWorkload(mapper, root); }  Workload parse(Reader reader); void parse(Writer writer, Workload workload);  }