HibernatePatientListDAO implements PatientListDAO { @Override public PatientList updatePatientList(PatientList patientList) throws DAOException { sessionFactory.getCurrentSession().update(patientList); return patientList; }  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 testUpdatePatientList() { PatientList patientList = dao.getPatientList(1); patientList.setName("NewNameList"); dao.updatePatientList(patientList); String name = dao.getPatientList(1).getName(); assertEquals(name, "NewNameList"); }