### Question:
OutboundQueueEntry { void fail(final OutboundQueueException cause) { if (!completed) { lastException = cause; completed = true; if (callback != null) { callback.onFailure(cause); callback = null; } } else { LOG.warn("Ignoring failure {} for completed message", cause); } }   static final Function<OfHeader, Boolean> DEFAULT_IS_COMPLETE; }### Answer:
@Test public void fail() throws Exception { outboundQueueEntry.commit(ofHeader, futureCallback); outboundQueueEntry.fail(null); Mockito.verify(futureCallback).onFailure(Mockito.<OutboundQueueException>any()); }