@Test public void testUpdateService() { serviceDao.create(service1); assertEquals("Engine oil replacement", service1.getName()); service1.setName("Barum"); service1.setPrice(new BigDecimal("333.00")); serviceDao.update(service1); Service updatedService = serviceDao.findById(service1.getId()); assertEquals("Barum", updatedService.getName()); assertEquals(updatedService.getPrice(), new BigDecimal("333.00")); }
@Test public void testFindByName() { serviceDao.create(service1); Service found = serviceDao.findByName(service1.getName()); assertEquals(found, service1); }