### Question:
OrderService implements OrderItemSaver { public List<OrderType> allOrderTypes() { if (orderTypes == null) { orderTypes = dbUtil.withDao(OrderType.class, new DbUtil.Operation<OrderType, List<OrderType>>() { @Override public List<OrderType> operate(Dao<OrderType, String> dao) throws SQLException { return dao.queryForAll(); } }); } return orderTypes; }  List<OrderReason> syncOrderReasons(); List<OrderType> allOrderTypes(); List<OrderReason> allOrderReasons(); List<Order> all(); String getNextSRVNumber(); void saveOrder(final Order order); @Override void saveOrderItem(final OrderItem orderItem); void syncOrderTypes();  }### Answer:
@Test public void shouldGetAllOrderTypes() throws Exception { final OrderType routine = new OrderType("Routine"); final OrderType emergency = new OrderType("emergency"); dbUtil.withDao(OrderType.class, new DbUtil.Operation<OrderType, OrderType>() { @Override public OrderType operate(Dao<OrderType, String> dao) throws SQLException { dao.create(routine); dao.create(emergency); return null; } }); assertThat(orderService.allOrderTypes().size(), is(2)); assertThat(orderService.allOrderTypes(), contains(routine, emergency)); }