### Question:
TransactionProcessorChain implements TransactionProcessor<Void, Void> { @Override public boolean isComplete() { return beforeProcessor.isComplete() && afterProcessor.isComplete(); } TransactionProcessorChain(TransactionProcessor beforeProcessor, TransactionProcessor afterProcessor); @Override void execute(); @Override boolean isComplete(); @Override ImmutableSet<Exception> getErrors(); @Override Map<Void, Void> getResults();  }### Answer:
@Test public void testCompletionStatus() { Mockito.when(mockProcessor1.isComplete()).thenReturn(true); Mockito.when(mockProcessor2.isComplete()).thenReturn(true); Assert.assertTrue(chain.isComplete()); Mockito.when(mockProcessor1.isComplete()).thenReturn(false); Assert.assertFalse(chain.isComplete()); Mockito.when(mockProcessor1.isComplete()).thenReturn(true); Mockito.when(mockProcessor2.isComplete()).thenReturn(false); Assert.assertFalse(chain.isComplete()); }