@Test public void shouldGetPODWithLineItemsByOrderId() throws Exception { Long podId = 2L; OrderPOD expectedOrderPOD = new OrderPOD(); expectedOrderPOD.setId(podId); OrderPODLineItem lineItem = new OrderPODLineItem(); lineItem.setPodId(podId); when(mapper.getPODById(podId)).thenReturn(expectedOrderPOD); expectedOrderPOD.setPodLineItems(asList(lineItem)); OrderPOD orderPod = repository.getPOD(podId); verify(mapper).getPODById(podId); assertThat(orderPod, is(expectedOrderPOD)); }
public OrderPOD getPOD(Long podId) { return mapper.getPODById(podId); }
PODRepository { public OrderPOD getPOD(Long podId) { return mapper.getPODById(podId); } }
PODRepository { public OrderPOD getPOD(Long podId) { return mapper.getPODById(podId); }  }
PODRepository { public OrderPOD getPOD(Long podId) { return mapper.getPODById(podId); }  void insertPODLineItem(OrderPODLineItem orderPodLineItem); void insertPOD(OrderPOD orderPod); OrderPOD getPODByOrderId(Long orderId); List<OrderPODLineItem> getNPodLineItems(String productCode, Rnr requisition, Integer n, Date startDate); OrderPOD getPOD(Long podId); OrderPOD insert(OrderPOD orderPOD); OrderPOD update(OrderPOD orderPOD); }
PODRepository { public OrderPOD getPOD(Long podId) { return mapper.getPODById(podId); }  void insertPODLineItem(OrderPODLineItem orderPodLineItem); void insertPOD(OrderPOD orderPod); OrderPOD getPODByOrderId(Long orderId); List<OrderPODLineItem> getNPodLineItems(String productCode, Rnr requisition, Integer n, Date startDate); OrderPOD getPOD(Long podId); OrderPOD insert(OrderPOD orderPOD); OrderPOD update(OrderPOD orderPOD);  }