@Test public void testGetPatientListByUuidShouldUsePrivileges() { Context.getUserContext().getAuthenticatedUser().removeRole(Context.getUserService().getRole("System Developer")); Context.getUserContext().removeProxyPrivilege("View Patient Lists"); String uuid = "68547121-1b70-465e-99ee-c9dfd95e7d30"; String result = null; try { result = s.getPatientListByUuid(uuid).getName(); fail("No privileges required for getPatientListByUuid"); } catch (APIAuthenticationException e) { Context.getUserContext().addProxyPrivilege("View Patient Lists"); result = s.getPatientListByUuid(uuid).getName(); } }
@Override public PatientList getPatientListByUuid(String uuid) { return dao.getPatientListByUuid(uuid); }
PatientListServiceImpl implements PatientListService { @Override public PatientList getPatientListByUuid(String uuid) { return dao.getPatientListByUuid(uuid); } }
PatientListServiceImpl implements PatientListService { @Override public PatientList getPatientListByUuid(String uuid) { return dao.getPatientListByUuid(uuid); }  }
PatientListServiceImpl implements PatientListService { @Override public PatientList getPatientListByUuid(String uuid) { return dao.getPatientListByUuid(uuid); }  @Override void setPatientListDAO(PatientListDAO dao); @Override PatientList savePatientList(PatientList patientList); @Override PatientList getPatientList(Integer id); @Override List<PatientList> getPatientListByName(String name); @Override PatientList getPatientListByUuid(String uuid); @Override List<PatientList> getPatientListByEncounterType(EncounterType encounterType); @Override List<PatientList> getAllPatientList(boolean includeRetired); @Override List<Encounter> getEncountersInPatientList(PatientList patientList); @Override List<Patient> getPatientsInPatientList(PatientList patientList); @Override PatientList updatePatientList(PatientList patientList); @Override void deletePatientList(PatientList patientList); @Override void onStartup(); @Override void onShutdown(); }
PatientListServiceImpl implements PatientListService { @Override public PatientList getPatientListByUuid(String uuid) { return dao.getPatientListByUuid(uuid); }  @Override void setPatientListDAO(PatientListDAO dao); @Override PatientList savePatientList(PatientList patientList); @Override PatientList getPatientList(Integer id); @Override List<PatientList> getPatientListByName(String name); @Override PatientList getPatientListByUuid(String uuid); @Override List<PatientList> getPatientListByEncounterType(EncounterType encounterType); @Override List<PatientList> getAllPatientList(boolean includeRetired); @Override List<Encounter> getEncountersInPatientList(PatientList patientList); @Override List<Patient> getPatientsInPatientList(PatientList patientList); @Override PatientList updatePatientList(PatientList patientList); @Override void deletePatientList(PatientList patientList); @Override void onStartup(); @Override void onShutdown();  }