### Question:
YamlUtil { public static String getValue(String filename, String key) throws FileNotFoundException { Map<String, String> ymlMap = getYmlByFileName(filename); if (ymlMap.isEmpty() || ymlMap == null) { return null; } return ymlMap.get(key); }  final static String key(String key); static List<LinkedHashMap<String, String>> getYmlByFileNamePerfect(String filename); static LinkedHashMap<String, String> getYmlByFileName(String filename); static Map<String, String> forEachYaml(String key_str, Map<String, Object> obj); static String getValue(String filename, String key); static StringWriter dump(Object obj); static StringWriter dumpAll(List list);  }### Answer:
@Test public void getValue() throws FileNotFoundException { String filename = "E:/configserver-application-0.1.0.0.yaml"; String key = "spec.template.spec.containers"; String value = yamlUtil.getValue(filename, key); System.out.println(value); }