use of org.apache.camel.support.DefaultExchange in project webofneeds by researchstudio-sat.
the class WonMessageSlipComputerTests method testSendMessageFromNode.
@Test
public void testSendMessageFromNode() throws Exception {
Exchange exchange = new DefaultExchange(new DefaultCamelContext());
exchange.getIn().setHeader(WonCamelConstants.MESSAGE_HEADER, dummyMessage);
exchange.getIn().setHeader(WonCamelConstants.MESSAGE_TYPE_HEADER, URI.create(WONMSG.ConnectionMessageString));
exchange.getIn().setHeader(WonCamelConstants.DIRECTION_HEADER, URI.create(WonMessageDirection.FROM_EXTERNAL.getResource().getURI().toString()));
exchange.getIn().setHeader(WonCamelConstants.SOCKET_TYPE_URI_HEADER, WXCHAT.ChatSocket.asURI());
String slip = fixedMessageProcessorSlip.evaluate(exchange, String.class);
Assert.assertEquals("bean:sendMessageFromNodeProcessor?method=process", slip);
}
Aggregations