### Question:
ResourceFactory { static Set<IResource> toResourceSet(String... resourceNames) { return Arrays .stream(resourceNames) .map(String::trim) .map(ResourceFactory::toResource) .collect(Collectors.toSet()); } private  ResourceFactory();   }### Answer:
@Test public void testStringArrayToResourceSet() { Set<IResource> expectedResourceSet = ImmutableSet.of(ConnectionResource.fromName("connections"), DataResource.fromName("data/ks")); assertThat(ResourceFactory.toResourceSet("connections", "data/ks")).isEqualTo(expectedResourceSet); }
@Test public void testStringSetToResourceSet() { Set<IResource> expectedResourceSet = ImmutableSet.of(ConnectionResource.fromName("connections"), DataResource.fromName("data/ks")); assertThat(ResourceFactory.toResourceSet(ImmutableSet.of("connections", "data/ks"))).isEqualTo(expectedResourceSet); }