### Question:
FactTypeInfoResolver implements Function<UUID, FactTypeInfoSEB> { @Override public FactTypeInfoSEB apply(UUID id) { if (id == null) return null; FactTypeEntity type = factManager.getFactType(id); if (type == null) return null; return FactTypeInfoSEB.builder() .setId(type.getId()) .setName(type.getName()) .build(); } @Inject  FactTypeInfoResolver(FactManager factManager); @Override FactTypeInfoSEB apply(UUID id);  }### Answer:
@Test public void testResolveNull() { assertNull(resolver.apply(null)); }
@Test public void testResolveNoTypeFound() { UUID id = UUID.randomUUID(); assertNull(resolver.apply(id)); verify(factManager).getFactType(id); }
@Test public void testResolveTypeFound() { FactTypeEntity entity = new FactTypeEntity() .setId(UUID.randomUUID()) .setName("name"); when(factManager.getFactType(isA(UUID.class))).thenReturn(entity); FactTypeInfoSEB seb = resolver.apply(entity.getId()); assertNotNull(seb); assertEquals(entity.getId(), seb.getId()); assertEquals(entity.getName(), seb.getName()); verify(factManager).getFactType(entity.getId()); }