### Question:
WorkflowLogContextListener implements WorkflowExecutorListener { @Override public void afterFailure(ListenerContext listenerContext, Throwable throwable) { MDC.remove(logContext); } WorkflowLogContextListener(String logContext); @Override void beforeProcessing(ListenerContext listenerContext); @Override void afterProcessing(ListenerContext listenerContext); @Override void afterFailure(ListenerContext listenerContext, Throwable throwable);  }### Answer:
@Test void afterFailureClearsContext() { MDC.put(LOG_CONTEXT, "foo"); listener.afterFailure(mock(ListenerContext.class), mock(Throwable.class)); assertThat(MDC.get(LOG_CONTEXT), is(nullValue())); }