### Question:
FactProducer implements Consumer<FactRecord> { @Override public void accept(FactRecord fact) { FactSEB seb = converter.apply(fact); if (seb != null) { LOGGER.debug("Sending Fact with id = %s to document channel.", seb.getId()); destination.getDocumentChannel().sendDocument(seb); } } @Inject  FactProducer(FactConverter converter, DocumentDestination<FactSEB> destination); @Override void accept(FactRecord fact);  }### Answer:
@Test public void testConsumeNull() { producer.accept(null); verifyNoInteractions(channel); }
@Test public void testConsumeObject() { when(converter.apply(any())).thenReturn(FactSEB.builder().build()); producer.accept(new FactRecord()); verify(converter).apply(notNull()); verify(channel).sendDocument(notNull()); }