Assert.assertNotNull(person);
Assert.assertEquals(4, person.getPersonId());
Assert.assertEquals("Amresh_4", person.getName());
person.setCurrentLocation(new Point(9.3, 5.8));
Vehicle vehicle = person.getVehicle();
vehicle.setCurrentLocation(new Point(5.67, 11.59));
vehicle.setPreviousLocation(new Point(15.67, 21.59));
person.setVehicle(vehicle);
dao.mergePerson(person);
dao.closeEntityManager();
dao.createEntityManager();
person = dao.findPerson(4);
Assert.assertNotNull(person);
Assert.assertEquals(4, person.getPersonId());
Assert.assertEquals("Amresh_4", person.getName());
Point currentLocation = person.getCurrentLocation();
Assert.assertNotNull(currentLocation);
Assert.assertEquals(9.3, currentLocation.getX());
Assert.assertEquals(5.8, currentLocation.getY());
vehicle = person.getVehicle();
Assert.assertNotNull(vehicle);
Assert.assertNotNull(vehicle.getCurrentLocation());
Assert.assertEquals(5.67, vehicle.getCurrentLocation().getX());