{
MuleLoggerContext context = (MuleLoggerContext) selector.getContext("", classLoader, true);
ArgumentCaptor<ShutdownListener> captor = ArgumentCaptor.forClass(ShutdownListener.class);
verify(classLoader).addShutdownListener(captor.capture());
ShutdownListener listener = captor.getValue();
assertThat(listener, notNullValue());
assertThat(context, is(selector.getContext(EMPTY, classLoader, true)));
listener.execute();
assertThat(context, not(selector.getContext("", classLoader, true)));
}