    @Test
    public void createOrder() throws Exception {

        // Create a new order and aggregate
        OrderAggregate expected = orderServiceV1.createOrder(new CreateOrderRequest(OrderStatus.CREATED));
        Assert.assertEquals(expected.getStatus(), OrderStatus.CREATED);

        String orderNumber = expected.getOrderNumber();

        // Process the pending order command
        expected = orderServiceV1.process(orderNumber, new PendingOrderCommand());
        Assert.assertEquals(expected.getStatus(), OrderStatus.PENDING);

        // Process the confirm order command
        expected = orderServiceV1.process(orderNumber, new ConfirmOrderCommand());
        Assert.assertEquals(expected.getStatus(), OrderStatus.CONFIRMED);

        // Process the confirm order command
        expected = orderServiceV1.process(orderNumber, new ShipOrderCommand());
        Assert.assertEquals(expected.getStatus(), OrderStatus.SHIPPED);

        // Lookup actual order and compare status
        OrderAggregate actual = orderServiceV1.getOrder(expected.getOrderNumber());
        Assert.assertNotNull(actual);
        Assert.assertEquals(expected.getStatus(), actual.getStatus());
    }