public class PojoTest extends TestCase {
public void test() throws IOException, SAXException {
Smooks smooks = new Smooks("smooks-config.xml");
Pojo pojo = new Pojo(smooks, "input-message.xml");
Order order = pojo.filter();
assertNotNull(order);
assertNotNull(order.getHeader());
assertNotNull(order.getOrderItems());
assertEquals(2, order.getOrderItems().size());
assertEquals(1163616328000L, order.getHeader().getDate().getTime());
assertEquals("Joe", order.getHeader().getCustomerName());
assertEquals(new Long(123123), order.getHeader().getCustomerNumber());
OrderItem orderItem = order.getOrderItems().get(0);
assertEquals(8.90d, orderItem.getPrice());
assertEquals(111, orderItem.getProductId());
assertEquals(new Integer(2), orderItem.getQuantity());
orderItem = order.getOrderItems().get(1);
assertEquals(5.20d, orderItem.getPrice());
assertEquals(222, orderItem.getProductId());
assertEquals(new Integer(7), orderItem.getQuantity());
}