### Question:
PluggableProcessor extends ClayProcessor implements Processor { @Override public void process(Exchange message) { final ClassLoader originalCL = currentThread().getContextClassLoader(); Object result = null; try { processAfterIn(message); Object proc = (this.processor != null) ? this.processor : procClass.newInstance(); currentThread().setContextClassLoader(classLoader); Object event = message.getIn().getBody(); injectFields(proc, message); if (event != null) { result = dispatchMessage(proc, event, message.getIn().getHeaders()); } } catch (Exception e) { logger.error(procClass + ": \n " + formatStackTrace(e), e); } finally { currentThread().setContextClassLoader(originalCL); } message.getIn().setBody(result); processBeforeOut(message); } PluggableProcessor(ClassLoader classLoader, Class procClass, MessagesSerializer messagesSerializer);  PluggableProcessor(ClassLoader classLoader, Class procClass, Object processor, MessagesSerializer messagesSerializer);  PluggableProcessor(Class procClass, MessagesSerializer messagesSerializer);  PluggableProcessor(Class procClass, Object processor, MessagesSerializer messagesSerializer); @Override void process(Exchange message);  }### Answer:
@Test public void testNoExceptionWhenNullBody() throws NoSuchMethodException { when(message.getBody()).thenReturn(null); pluggableProcessor.process(exchange); verify(message, atLeast(2)).getBody(); verify(message).setBody(eq(null)); verifyNoMoreInteractions(mockedThis); }