FeatureConfigParser { public void parseConfig(final InputStream configStream) throws IOException { final ObjectMapper om = new ObjectMapper(); final JsonNode rootNode = om.readTree(configStream); final JsonNode tables = rootNode.path("tables"); final Iterator<Map.Entry<String, JsonNode>> nodeIterator = tables.fields(); while (nodeIterator.hasNext()) { final Map.Entry<String, JsonNode> feature = nodeIterator.next(); final FeatureDefinition fd = parseFeature(feature.getKey(), feature.getValue()); FeatureDefinitionSet.Features.add(fd); } }  void parseConfig(final InputStream configStream);  }
@Test public void testFeatureConfigParser() throws IOException { final FeatureConfigParser fcp = new FeatureConfigParser(); try (FileInputStream fis = new FileInputStream(new File(TEST_DATA_CONFIG))) { fcp.parseConfig(fis); } }