use of ca.uhn.hl7v2.model.v24.datatype.ST in project quickstarts by jboss-switchyard.
the class HL7ServiceTest method testCamelRoute.
@Test
public void testCamelRoute() {
StringBuilder in = new StringBuilder();
in.append(LINE_ONE);
in.append("\r");
in.append(LINE_TWO);
String result = processMessage.sendInOut(in).getContent(String.class);
;
PipeParser pipeParser = new PipeParser();
try {
//parse the message string into a Message object
Message message = pipeParser.parse(result);
if (message instanceof QRY_A19) {
QRD qrd = (QRD) message.get("QRD");
ST st = qrd.getQueryID();
Assert.assertTrue(st.getValue().equals("GetPatient"));
} else {
Assert.fail("Message not instance of QRY_A19");
}
} catch (Exception e) {
Assert.fail(e.getMessage());
}
}