### Question:
CamelConsumerEndpoint extends ConsumerEndpoint implements AsyncProcessor { public void process(final MessageExchange messageExchange) throws Exception { final ContinuationData data = continuations.remove(messageExchange.getExchangeId()); if (data == null) { logger.error("Unexpected MessageExchange received: {}", messageExchange); } else { binding.runWithCamelContextClassLoader(new Callable<Object>() { public Object call() throws Exception { processReponse(messageExchange, data.exchange); data.callback.done(false); return null; } }); } } CamelConsumerEndpoint(JbiBinding binding, JbiEndpoint jbiEndpoint); void process(final MessageExchange messageExchange); void process(Exchange exchange); boolean process(Exchange exchange, AsyncCallback asyncCallback); @Override void validate(); static final QName SERVICE_NAME; }### Answer:
@Test public void testInvalidMessageExchangeDoesNotThrowException() throws Exception { client.sendBody("direct:a", "<hello>world</hello>"); String endpointName = jbiContainer.getRegistry().getExternalEndpointsForService(CamelConsumerEndpoint.SERVICE_NAME)[0].getEndpointName(); CamelConsumerEndpoint endpoint = (CamelConsumerEndpoint) component.getRegistry().getEndpoint(CamelConsumerEndpoint.SERVICE_NAME + ":" + endpointName); try { endpoint.process(new MockMessageExchange() { @Override public String getExchangeId() { return "a-fake-exchange-id"; } }); } catch (Exception e) { fail("Should not throw " + e); } }