@Test public void shouldReturnBedAssignmentDetailsByPatient() { PatientService patientService = Context.getPatientService(); Patient patient = patientService.getPatient(3); LocationService locationService = Context.getLocationService(); Location ward = locationService.getLocation(123452); String bedNumFromDataSetup = "307-a"; BedDetails bedDetails = bedManagementService.getBedAssignmentDetailsByPatient(patient); assertEquals(ward.getId(), bedDetails.getPhysicalLocation().getId()); assertEquals(bedIdFromDataSetup, bedDetails.getBedId()); assertEquals(bedNumFromDataSetup, bedDetails.getBedNumber()); }