### Question:
ConfigLoader { public ConfigSource fromPropertiesYamlLiteral(Properties props, String keyPrefix) { ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); for (String propName : props.stringPropertyNames()) { builder.put(propName, props.getProperty(propName)); } return fromPropertiesYamlLiteral(builder.build(), keyPrefix); } @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 testFromYamlProperties() throws IOException { Properties props = new Properties(); props.setProperty("type", "test"); props.setProperty("data", "1"); ConfigSource config = loader.fromPropertiesYamlLiteral(props, ""); assertEquals("test", config.get(String.class, "type")); assertEquals(1, (int) config.get(Integer.class, "data")); }
@Test public void testFromYamlPropertiesNested() throws IOException { Properties props = new Properties(); props.setProperty("type", "test"); props.setProperty("columns.k1", "1"); props.setProperty("values.myval.data", "2"); ConfigSource config = loader.fromPropertiesYamlLiteral(props, ""); System.out.println("config: " + config); assertEquals("test", config.get(String.class, "type")); assertEquals(1, (int) config.getNested("columns").get(Integer.class, "k1")); assertEquals(2, (int) config.getNested("values").getNested("myval").get(Integer.class, "data")); }