HibernatePatientListDAO implements PatientListDAO { @Override public PatientList getPatientList(Integer patientListId) throws DAOException { return (PatientList) sessionFactory.getCurrentSession().get(PatientList.class, patientListId); }  void setSessionFactory(SessionFactory sessionFactory); @Override PatientList savePatientList(PatientList patientList); @Override void deletePatientList(PatientList patientList); @Override PatientList getPatientList(Integer patientListId); @Override List<PatientList> getPatientListByEncounterType(EncounterType encounterType); @Override PatientList getPatientListByUuid(String uuid); @Override List<PatientList> getPatientListByName(String name); @Override List<PatientList> getAllPatientList(boolean includeRetired); @Override PatientList updatePatientList(PatientList patientList);  }
@Test public void testGetPatientList() { Integer patientListId = 1; PatientList result = dao.getPatientList(patientListId); String name = result.getName(); assertEquals("TestList1", name); }