assertEquals(OrderEvent.OrderEventType.ORDER_CREATED, order.getEventLog().get(0).getType());
}
public void testFindOrdersForCustomer() throws Exception {
Order order = new Order();
Customer customer = new Customer();
customer.setEmail("someuser@somedomain.com");
order.setCustomer(customer);
instance.placeOrder(order);
Order order2 = new Order();
order2.setCustomer(customer);
instance.placeOrder(order2);
Order order3 = new Order();
Customer customer2 = new Customer();
customer2.setEmail("someoneelse@somedomain.com");
order.setCustomer(customer2);
instance.placeOrder(order3);
List<Order> orders = instance.listOrdersForCustomer("someuser@somedomain.com");
assertEquals(2, orders.size());