### Question:
AwsTaggingService { public Collection<com.amazonaws.services.cloudformation.model.Tag> prepareCloudformationTags(AuthenticatedContext ac, Map<String, String> userDefinedTags) { Collection<com.amazonaws.services.cloudformation.model.Tag> tags = new ArrayList<>(); tags.addAll(userDefinedTags.entrySet().stream() .map(entry -> prepareCloudformationTag(entry.getKey(), entry.getValue())) .collect(Collectors.toList())); return tags; }  Collection<com.amazonaws.services.cloudformation.model.Tag> prepareCloudformationTags(AuthenticatedContext ac, Map<String, String> userDefinedTags); Collection<com.amazonaws.services.ec2.model.Tag> prepareEc2Tags(AuthenticatedContext ac, Map<String, String> userDefinedTags); void tagRootVolumes(AuthenticatedContext ac, AmazonEC2Client ec2Client, List<CloudResource> instanceResources, Map<String, String> userDefinedTags);  }### Answer:
@Test public void testWhenUserTagsDefined() { Map<String, String> userDefined = Maps.newHashMap(); userDefined.put("userdefinedkey", "userdefinedvalue"); Collection<Tag> tags = awsTaggingService.prepareCloudformationTags(authenticatedContext(), userDefined); assertEquals(1L, tags.size()); }