### Question:
EurekaMetadataParser { public List<ApiInfo> parseApiInfo(Map<String, String> eurekaMetadata) { Map<String, ApiInfo> apiInfo = new HashMap<>(); eurekaMetadata.entrySet() .stream() .filter(metadata -> metadata.getKey().startsWith(API_INFO)) .forEach(metadata -> { String[] keys = metadata.getKey().split("\\."); if (keys.length == 4) { apiInfo.putIfAbsent(keys[2], new ApiInfo()); ApiInfo api = apiInfo.get(keys[2]); switch (keys[3]) { case API_INFO_API_ID: api.setApiId(metadata.getValue()); break; case API_INFO_GATEWAY_URL: api.setGatewayUrl(metadata.getValue()); break; case API_INFO_VERSION: api.setVersion(metadata.getValue()); break; case API_INFO_SWAGGER_URL: api.setSwaggerUrl(metadata.getValue()); break; case API_INFO_DOCUMENTATION_URL: api.setDocumentationUrl(metadata.getValue()); break; default: apimlLog.log("org.zowe.apiml.common.apiInfoParsingError", metadata); break; } } }); return new ArrayList<>(apiInfo.values()); }  List<ApiInfo> parseApiInfo(Map<String, String> eurekaMetadata); RoutedServices parseRoutes(Map<String, String> eurekaMetadata); List<RoutedService> parseToListRoute(Map<String, String> eurekaMetadata); static Map<String, String> generateMetadata(String serviceId, ApiInfo apiInfo);  }### Answer:
@Test public void testParseApiInfo() { Map<String, String> metadata = new HashMap<>(); metadata.put(API_INFO + ".1." + API_INFO_GATEWAY_URL, "gatewayUrl"); metadata.put(API_INFO + ".2." + API_INFO_GATEWAY_URL, "gatewayUrl2"); metadata.put(API_INFO + ".2." + API_INFO_SWAGGER_URL, "swagger"); metadata.put(API_INFO + ".2." + API_INFO_DOCUMENTATION_URL, "doc"); metadata.put(API_INFO + ".1." + API_INFO_API_ID, "org.zowe.test"); metadata.put(API_INFO + ".1." + API_INFO_VERSION, "1.0.0"); metadata.put(API_INFO + ".1.badArgument", "garbage"); List<ApiInfo> info = eurekaMetadataParser.parseApiInfo(metadata); assertEquals(2, info.size()); assertEquals("gatewayUrl", info.get(0).getGatewayUrl()); assertEquals("org.zowe.test", info.get(0).getApiId()); assertEquals("1.0.0", info.get(0).getVersion()); assertEquals("gatewayUrl2", info.get(1).getGatewayUrl()); assertEquals("swagger", info.get(1).getSwaggerUrl()); assertEquals("doc", info.get(1).getDocumentationUrl()); }