### Question:
ComputeServiceUtils { public static Map<String, String> metadataAndTagsAsValuesOfEmptyString(TemplateOptions options) { Builder<String, String> builder = ImmutableMap.<String, String> builder(); builder.putAll(options.getUserMetadata()); for (String tag : options.getTags()) builder.put(tag, ""); return builder.build(); }  static String formatStatus(ComputeMetadataIncludingStatus<?> resource); static Statement execHttpResponse(HttpRequest request); static Statement execHttpResponse(URI location); static Statement extractTargzIntoDirectory(HttpRequest targz, String directory); static Statement extractTargzIntoDirectory(URI targz, String directory); static Statement extractZipIntoDirectory(HttpRequest zip, String directory); static Statement extractZipIntoDirectory(URI zip, String directory); static double getCores(Hardware input); static double getCoresAndSpeed(Hardware input); static double getSpace(Hardware input); static org.jclouds.compute.domain.OsFamily parseOsFamilyOrUnrecognized(String in); static String createExecutionErrorMessage(Map<?, Exception> executionExceptions); static String createNodeErrorMessage(Map<? extends NodeMetadata, ? extends Throwable> failedNodes); static Iterable<? extends ComputeMetadata> filterByName(Iterable<? extends ComputeMetadata> nodes,
            final String name); static Map<String, String> metadataAndTagsAsValuesOfEmptyString(TemplateOptions options); static NodeMetadataBuilder addMetadataAndParseTagsFromValuesOfEmptyString(NodeMetadataBuilder builder,
            Map<String, String> map); static Map<String, String> metadataAndTagsAsCommaDelimitedValue(TemplateOptions options); static NodeMetadataBuilder addMetadataAndParseTagsFromCommaDelimitedValue(NodeMetadataBuilder builder,
            Map<String, String> map); static String parseVersionOrReturnEmptyString(org.jclouds.compute.domain.OsFamily family, String in,
            Map<OsFamily, Map<String, String>> osVersionMap); static Map<Integer, Integer> getPortRangesFromList(int... ports); static String groupFromMapOrName(Map<String, String> metadataMap, String nodeName, GroupNamingConvention namingConvention); static final Pattern DELIMITED_BY_HYPHEN_ENDING_IN_HYPHEN_HEX; }### Answer:
@Test public void testMetadataAndTagsAsValuesOfEmptyString() { TemplateOptions options = TemplateOptions.Builder.tags(ImmutableSet.of("tag")).userMetadata(ImmutableMap.<String, String>of("foo", "bar")); assertEquals(metadataAndTagsAsValuesOfEmptyString(options), ImmutableMap.<String, String>of("foo", "bar", "tag", "")); }
@Test public void testMetadataAndTagsAsValuesOfEmptyStringNoTags() { TemplateOptions options = TemplateOptions.Builder.userMetadata(ImmutableMap.<String, String>of("foo", "bar")); assertEquals(metadataAndTagsAsValuesOfEmptyString(options), ImmutableMap.<String, String>of("foo", "bar")); }