### Question:
MetadataTranslationService { protected void updateZosmfAuthentication(String serviceId, Map<String, String> metadata) { if (!StringUtils.containsIgnoreCase(serviceId, "zosmf")) return; if (metadata.containsKey(AUTHENTICATION_SCHEME)) return; metadata.put(AUTHENTICATION_SCHEME, AuthenticationScheme.ZOSMF.getScheme()); }  void translateMetadata(String serviceId, Map<String, String> metadata);  }### Answer:
@Test public void testSetZosmfAuthentication() { MetadataTranslationService metadataTranslationService = new MetadataTranslationService(); Map<String, String> metadata = new HashMap<>(); metadataTranslationService.updateZosmfAuthentication("service", metadata); assertTrue(metadata.isEmpty()); metadataTranslationService.updateZosmfAuthentication("serviceZosmfX", metadata); assertFalse(metadata.isEmpty()); assertEquals(1, metadata.size()); assertEquals(AuthenticationScheme.ZOSMF.getScheme(), metadata.get(AUTHENTICATION_SCHEME)); metadata.put(AUTHENTICATION_SCHEME, AuthenticationScheme.BYPASS.getScheme()); metadataTranslationService.updateZosmfAuthentication("serviceZosmfX", metadata); assertEquals(AuthenticationScheme.BYPASS.getScheme(), metadata.get(AUTHENTICATION_SCHEME)); assertEquals(1, metadata.size()); metadata.put(AUTHENTICATION_SCHEME, AuthenticationScheme.HTTP_BASIC_PASSTICKET.getScheme()); metadata.put(AUTHENTICATION_APPLID, "applid"); metadataTranslationService.updateZosmfAuthentication("serviceZosmfX", metadata); assertEquals(AuthenticationScheme.HTTP_BASIC_PASSTICKET.getScheme(), metadata.get(AUTHENTICATION_SCHEME)); assertEquals("applid", metadata.get(AUTHENTICATION_APPLID)); assertEquals(2, metadata.size()); }