@Test public void shouldLoadAPerson() { Long template = dataInitializer.people.get(0); Person p = personDao.find(template); Assert.assertNotNull("Person not found!", p); Assert.assertEquals(template, p.getId()); }
@Test public void shouldSaveAPerson() { Person p = new Person(); p.setFirstName("Andy"); p.setLastName("Gibson"); personDao.save(p); Long id = p.getId(); Assert.assertNotNull(id); }