YamlMap extends AbstractBaseYaml { @Override public Object dataTree() { return dataTree; } YamlMap(String key, Object value);  YamlMap(Map<String, Object> dataTree); @Override Object dataTree();  }
@Test public void testYamlMapFromMap() { Map<String, Object> map = new HashMap<>(); map.put("key", "value"); ImmutableMap<String, Object> immutableMap = ImmutableMap.copyOf(map); YamlMap yamlMap = new YamlMap(map); assertEquals("yaml map should have immutable map", immutableMap, yamlMap.dataTree()); }
@Test public void testYamlMapFromStringObjectPair() { YamlMap yamlMap = new YamlMap("key", "value"); ImmutableMap<String, Object> immutableMap = ImmutableMap.of("key", "value"); assertEquals("yaml map should have immutable map", immutableMap, yamlMap.dataTree()); }