### Question:
OriginInfoResolver implements Function<UUID, OriginInfoSEB> { @Override public OriginInfoSEB apply(UUID id) { if (id == null) return null; OriginEntity origin = originManager.getOrigin(id); if (origin == null) return null; return OriginInfoSEB.builder() .setId(origin.getId()) .setName(origin.getName()) .build(); } @Inject  OriginInfoResolver(OriginManager originManager); @Override OriginInfoSEB apply(UUID id);  }### Answer:
@Test public void testResolveNull() { assertNull(resolver.apply(null)); }
@Test public void testResolveNoOriginFound() { UUID id = UUID.randomUUID(); assertNull(resolver.apply(id)); verify(originManager).getOrigin(id); }
@Test public void testResolveOriginFound() { OriginEntity entity = new OriginEntity() .setId(UUID.randomUUID()) .setName("name"); when(originManager.getOrigin(isA(UUID.class))).thenReturn(entity); OriginInfoSEB seb = resolver.apply(entity.getId()); assertNotNull(seb); assertEquals(entity.getId(), seb.getId()); assertEquals(entity.getName(), seb.getName()); verify(originManager).getOrigin(entity.getId()); }