### Question:
ObjectFactTypeResolver { public Set<UUID> factTypeNamesToIds(Set<String> types) { return SetUtils.set(types, this::factTypeNameToId); } @Inject  ObjectFactTypeResolver(FactManager factManager, ObjectManager objectManager); UUID factTypeNameToId(String type); Set<UUID> factTypeNamesToIds(Set<String> types); ObjectTypeStruct toObjectTypeStruct(UUID id); FactTypeStruct toFactTypeStruct(UUID id);  }### Answer:
@Test public void testGetFactTypeIdsBasedOnNames() { UUID uuid1 = UUID.randomUUID(); UUID uuid2 = UUID.randomUUID(); when(factManager.getFactType("test1")).thenReturn(new FactTypeEntity().setId(uuid1)); when(factManager.getFactType("test2")).thenReturn(new FactTypeEntity().setId(uuid2)); assertEquals(SetUtils.set(uuid1, uuid2), resolver.factTypeNamesToIds(SetUtils.set("test1", "test2"))); }
@Test public void testGetNonExistingFactTypeIdsBasedOnNames() { assertEquals(new HashSet<>(), resolver.factTypeNamesToIds(new HashSet<>())); assertEquals(new HashSet<>(), resolver.factTypeNamesToIds(null)); }