@Override
protected void update()
{
// Find Person 1
PersonnelUniMTo1 p1 = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_1");
Assert.assertNotNull(p1);
p1.setPersonName("Saurabh");
p1.getAddress().setStreet("Brand New Street");
dao.merge(p1);
PersonnelUniMTo1 p1AfterMerge = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_1");
Assert.assertNotNull(p1AfterMerge);
Assert.assertEquals("Saurabh", p1AfterMerge.getPersonName());
Assert.assertEquals("Brand New Street", p1AfterMerge.getAddress().getStreet());
// Find Person 2
PersonnelUniMTo1 p2 = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_2");
Assert.assertNotNull(p2);
Assert.assertNotNull(p2.getAddress());
Assert.assertNotNull(p2.getAddress().getAddressId());
p2.setPersonName("Prateek");
dao.merge(p2);
PersonnelUniMTo1 p2AfterMerge = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_2");
Assert.assertNotNull(p2AfterMerge);
Assert.assertEquals("Prateek", p2AfterMerge.getPersonName());
Assert.assertEquals("Brand New Street", p2AfterMerge.getAddress().getStreet());
}