@Test public void create() throws Exception { orderId = 554l; orderLineId = 33l; quantity = 4; orderLine = new OrderLine.Builder(orderId, orderLineId, quantity).build(); Assert.assertNotNull(orderLine); Assert.assertEquals(orderId, orderLine.getOrderId()); repository.save(orderLine); id = orderLine.getId(); Assert.assertEquals(id, orderLine.getId()); }
@Test(dependsOnMethods = "create") public void testGetOrderLine() throws Exception { orderLine = service.getOrderLine(id); Assert.assertEquals(id, orderLine.getId()); }