### Question:
ConfigLoader { public ConfigSource fromJson(InputStream stream) throws IOException { JsonNode node = new ObjectMapper().readTree(stream); validateJsonNode(node); return new DataSourceImpl(model, (ObjectNode) node); } @Inject @SuppressWarnings("deprecation") // https://github.com/embulk/embulk/issues/1304  ConfigLoader(ModelManager model); ConfigSource newConfigSource(); ConfigSource fromJsonString(String string); ConfigSource fromJsonFile(File file); ConfigSource fromJson(InputStream stream); ConfigSource fromYamlString(String string); ConfigSource fromYamlFile(File file); ConfigSource fromYaml(InputStream stream); @Deprecated // https://github.com/embulk/embulk/issues/934 @SuppressWarnings("checkstyle:OverloadMethodsDeclarationOrder") ConfigSource fromJson(JsonParser parser); ConfigSource fromPropertiesYamlLiteral(Properties props, String keyPrefix); ConfigSource fromPropertiesYamlLiteral(Map<String, String> props, String keyPrefix); @Deprecated ConfigSource fromPropertiesAsIs(final Properties properties);  }### Answer:
@Test public void testFromEmptyJson() throws IOException { ConfigSource config = loader.fromJson(newInputStream("{\"type\":\"test\",\"data\":1}")); assertEquals("test", config.get(String.class, "type")); assertEquals(1, (int) config.get(Integer.class, "data")); }