@Test public void shouldGetAllShipmentLineItemsForAnOrder() throws Exception { Long orderId = 12345L; List<ShipmentLineItem> expectedLineItems = asList(new ShipmentLineItem()); when(shipmentRepository.getLineItems(orderId)).thenReturn(expectedLineItems); List<ShipmentLineItem> lineItems = shipmentService.getLineItems(orderId); assertThat(lineItems, is(expectedLineItems)); }
public List<ShipmentLineItem> getLineItems(long orderId) { return shipmentRepository.getLineItems(orderId); }
ShipmentService { public List<ShipmentLineItem> getLineItems(long orderId) { return shipmentRepository.getLineItems(orderId); } }
ShipmentService { public List<ShipmentLineItem> getLineItems(long orderId) { return shipmentRepository.getLineItems(orderId); }  }
ShipmentService { public List<ShipmentLineItem> getLineItems(long orderId) { return shipmentRepository.getLineItems(orderId); }  void save(ShipmentLineItem shipmentLineItem); void insertShipmentFileInfo(ShipmentFileInfo shipmentFileInfo); List<ShipmentLineItem> getLineItems(long orderId); }
ShipmentService { public List<ShipmentLineItem> getLineItems(long orderId) { return shipmentRepository.getLineItems(orderId); }  void save(ShipmentLineItem shipmentLineItem); void insertShipmentFileInfo(ShipmentFileInfo shipmentFileInfo); List<ShipmentLineItem> getLineItems(long orderId);  }