public void test() throws JiBXException {
IBindingFactory bfact = BindingDirectory.getFactory(Order.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
for(int i = 0; i < TestConstants.NUM_WARMUPS; i++) {
Order order = (Order) uctx.unmarshalDocument(TestConstants.getMessageReader(), null);
}
long start = System.currentTimeMillis();
for(int i = 0; i < TestConstants.NUM_ITERATIONS; i++) {
Order order = (Order) uctx.unmarshalDocument(TestConstants.getMessageReader(), null);
}
System.out.println("JiBX took: " + (System.currentTimeMillis() - start));
Order order = (Order) uctx.unmarshalDocument(TestConstants.getMessageReader(), null);
if(order != null) {
System.out.println("Num order items: " + order.getOrderItems().size());
}
}