### Question:
OrganizationInfoResolver implements Function<UUID, OrganizationInfoSEB> { @Override public OrganizationInfoSEB apply(UUID id) { if (id == null) return null; Organization organization = organizationResolver.resolveOrganization(id); if (organization == null) return null; return OrganizationInfoSEB.builder() .setId(organization.getId()) .setName(organization.getName()) .build(); } @Inject  OrganizationInfoResolver(OrganizationResolver organizationResolver); @Override OrganizationInfoSEB apply(UUID id);  }### Answer:
@Test public void testResolveNull() { assertNull(resolver.apply(null)); }
@Test public void testResolveNoOrganizationFound() { UUID id = UUID.randomUUID(); assertNull(resolver.apply(id)); verify(organizationResolver).resolveOrganization(id); }
@Test public void testResolveOrganizationFound() { Organization model = Organization.builder() .setId(UUID.randomUUID()) .setName("name") .build(); when(organizationResolver.resolveOrganization(isA(UUID.class))).thenReturn(model); OrganizationInfoSEB seb = resolver.apply(model.getId()); assertNotNull(seb); assertEquals(model.getId(), seb.getId()); assertEquals(model.getName(), seb.getName()); verify(organizationResolver).resolveOrganization(model.getId()); }