### Question:
JsonToImageTranslator { @VisibleForTesting static ImmutableSet<AbsoluteUnixPath> volumeMapToSet(@Nullable Map<String, Map<?, ?>> volumeMap) throws BadContainerConfigurationFormatException { if (volumeMap == null) { return ImmutableSet.of(); } ImmutableSet.Builder<AbsoluteUnixPath> volumeList = ImmutableSet.builder(); for (String volume : volumeMap.keySet()) { try { volumeList.add(AbsoluteUnixPath.get(volume)); } catch (IllegalArgumentException exception) { throw new BadContainerConfigurationFormatException("Invalid volume path: " + volume); } } return volumeList.build(); } private  JsonToImageTranslator(); static Image toImage(V21ManifestTemplate manifestTemplate); static Image toImage(
      BuildableManifestTemplate manifestTemplate,
      ContainerConfigurationTemplate containerConfigurationTemplate);  }### Answer:
@Test public void testVolumeMapToList() throws BadContainerConfigurationFormatException { ImmutableSortedMap<String, Map<?, ?>> input = ImmutableSortedMap.of( "/var/job-result-data", ImmutableMap.of(), "/var/log/my-app-logs", ImmutableMap.of()); ImmutableSet<AbsoluteUnixPath> expected = ImmutableSet.of( AbsoluteUnixPath.get("/var/job-result-data"), AbsoluteUnixPath.get("/var/log/my-app-logs")); Assert.assertEquals(expected, JsonToImageTranslator.volumeMapToSet(input)); ImmutableList<Map<String, Map<?, ?>>> badInputs = ImmutableList.of( ImmutableMap.of("var/job-result-data", ImmutableMap.of()), ImmutableMap.of("log", ImmutableMap.of()), ImmutableMap.of("C:/udp", ImmutableMap.of())); for (Map<String, Map<?, ?>> badInput : badInputs) { try { JsonToImageTranslator.volumeMapToSet(badInput); Assert.fail(); } catch (BadContainerConfigurationFormatException ignored) { } } }