### Question:
MetadataTranslationService { public void translateMetadata(String serviceId, Map<String, String> metadata) { String version = metadata.get(VERSION); if (version == null) { translateV1toV2(metadata); } updateZosmfAuthentication(serviceId, metadata); }  void translateMetadata(String serviceId, Map<String, String> metadata);  }### Answer:
@Test public void translateMetadata() { Map<String, String> metadata = generateMetadataV1(); MetadataTranslationService metadataTranslationService = new MetadataTranslationService(); metadataTranslationService.translateMetadata("serviceV1", metadata); assertThat(metadata, hasEntry(ROUTES + ".ui__v1." + ROUTES_SERVICE_URL, "/" + INSTANCE_NAME)); assertThat(metadata, hasEntry(ROUTES + ".ui__v1." + ROUTES_GATEWAY_URL, "ui/v1")); assertThat(metadata, hasEntry(ROUTES + ".api__v1." + ROUTES_SERVICE_URL, "/" + INSTANCE_NAME + "/api/v1")); assertThat(metadata, hasEntry(ROUTES + ".api__v1." + ROUTES_GATEWAY_URL, "/api/v1")); assertThat(metadata, hasEntry(CATALOG_ID, "id")); assertThat(metadata, hasEntry(CATALOG_TITLE, "Title")); assertThat(metadata, hasEntry(CATALOG_DESCRIPTION, "Description")); assertThat(metadata, hasEntry(CATALOG_VERSION, "Version")); assertThat(metadata, hasEntry(SERVICE_TITLE, "service title")); assertThat(metadata, hasEntry(SERVICE_DESCRIPTION, "service description")); assertThat(metadata, hasEntry(API_INFO + ".0.apiId", "apiId")); assertThat(metadata, hasEntry(API_INFO + ".0.swaggerUrl", "swaggerUrl")); assertThat(metadata, hasEntry(API_INFO + ".0.documentationUrl", "documentationUrl")); assertThat(metadata, hasEntry(API_INFO + ".0.gatewayUrl", "gatewayUrl")); assertThat(metadata, not(hasEntry(API_VERSION_PROPERTIES_BASE_PACKAGE_V1, "api info base package"))); assertThat(metadata, not(hasEntry(API_VERSION_PROPERTIES_TITLE_V1, "api info title"))); assertThat(metadata, not(hasEntry(API_VERSION_PROPERTIES_VERSION_V1, "api info version"))); assertThat(metadata, not(hasEntry(API_VERSION_PROPERTIES_DESCRIPTION_V1, "api info description"))); assertThat(metadata, not(hasEntry(ENABLE_APIDOC_V1, "true"))); }