### Question:
ConfigService { public List<Map<String, String>> getInfo() { List<Map<String, String>> retval = new ArrayList<>(); if (configList != null) { retval = configList.stream().map(this::createMap).filter(Objects::nonNull) .collect(Collectors.toList()); } return retval; }  List<Map<String, String>> getInfo(); String getConfigAsJson(String name); List<AcmConfig> getConfigList(); void setConfigList(List<AcmConfig> configList);  }### Answer:
@Test public void getInfo() throws Exception { AppConfig acmConfig1 = new AppConfig(); PropertyConfig acmConfig2 = new PropertyConfig(); JsonConfig acmConfig3 = new JsonConfig(); acmConfig1.setConfigName("appConfigName"); acmConfig1.setConfigDescription("appConfigDescription"); acmConfig2.setConfigName("propertyConfigName"); acmConfig2.setConfigDescription("propertyConfigDescription"); acmConfig3.setConfigName("jsonConfigName"); acmConfig3.setConfigDescription("jsonConfigDescription"); List<AcmConfig> configList = Arrays.asList(acmConfig1, acmConfig2, acmConfig3); unit.setConfigList(configList); List<Map<String, String>> returned = unit.getInfo(); assertNotNull(returned); assertNotNull(returned); assertEquals(acmConfig1.getConfigName(), returned.get(0).get("name")); assertEquals(acmConfig1.getConfigDescription(), returned.get(0).get("description")); assertEquals(acmConfig2.getConfigName(), returned.get(1).get("name")); assertEquals(acmConfig2.getConfigDescription(), returned.get(1).get("description")); assertEquals(acmConfig3.getConfigName(), returned.get(2).get("name")); assertEquals(acmConfig3.getConfigDescription(), returned.get(2).get("description")); }