### Question:
CamelResponseHandler implements ExchangeHandler { @Override public void handleMessage(final Exchange switchYardExchange) throws HandlerException { try { compose(switchYardExchange); } catch (Exception e) { throw new HandlerException(e); } } CamelResponseHandler(final org.apache.camel.Exchange camelExchange, final ServiceReference reference, final MessageComposer<CamelBindingData> messageComposer); @Override void handleMessage(final Exchange switchYardExchange); @Override void handleFault(final Exchange exchange);  }### Answer:
@Test (expected = RuntimeException.class) public void constructor() throws Exception { final CamelResponseHandler responseHandler = new CamelResponseHandler(null, null, _messageComposer); responseHandler.handleMessage(null); }
@Test public void handleMessageWithOutputType() throws HandlerException { final Exchange camelExchange = createCamelExchange(); final ServiceReference serviceReference = createMockServiceRef(); final org.switchyard.Exchange switchYardExchange = createMockExchangeWithBody(new MessageCreator() { @Override public Message create() { Message message = mock(Message.class); when(message.getContext()).thenReturn(new DefaultContext(Scope.MESSAGE)); when(message.getContent(Integer.class)).thenReturn(10); return message; } }); final CamelResponseHandler responseHandler = new CamelResponseHandler(camelExchange, serviceReference, _messageComposer); responseHandler.handleMessage(switchYardExchange); assertThat(switchYardExchange.getMessage().getContent(Integer.class), is(equalTo(new Integer(10)))); }