from("mina2:tcp://127.0.0.1:" + getPort() + "?sync=true&codec=#hl7codec").process(new Processor() {
public void process(Exchange exchange) throws Exception {
assertEquals(70010, exchange.getIn().getBody().toString().length());
MDM_T02 input = (MDM_T02)exchange.getIn().getBody(Message.class);
assertEquals("2.5", input.getVersion());
MSH msh = input.getMSH();
assertEquals("20071129144629", msh.getDateTimeOfMessage().getTime().getValue());
exchange.getOut().setBody("some response");
}
}).to("mock:result");
}
};