/** Create a patient and then requery it */ @Test public void testGetById() throws Exception { Patient patient = roleHelper.createPatient("564564564", testRenalUnit, testDiseaseUnit); patientManager.save(patient); Patient returnPatient = patientManager.getById(patient.getId()); Assert.assertNotNull("There must be a patient returned", returnPatient); Assert.assertTrue( "The two patients must have the same id", patient.getId().equals(patient.getId())); }