### Question:
OntologyEntryEJB3DAO extends AnnotatableEJB3DAO<T> implements OntologyEntryDAO<T> { public List<T> getOntologyEntriesByRefSource(String refSourceName) { List result = getSession().createCriteria(getPersistentClass()) .createCriteria("source") .add(Restrictions.eq("name", refSourceName).ignoreCase()) .list(); return result; } OntologyEntryEJB3DAO(); protected  OntologyEntryEJB3DAO(Class<T> persistentClass);  OntologyEntryEJB3DAO(Class<T> persistentClass, EntityManager entityManager); T getByAcc(String acc); T getOntologyEntryByAcc(String acc); T getOntologyEntryByAccAndRefSource( String acc, String refSourceAcc); T getByNameAndRefSource(String name, String refSourceAcc); List<T> getOntologyEntriesByRefSource(String refSourceName); List<String> getOntologyEntryAccsByRefSource(String refSourceAcc);  }### Answer:
@Test public void testGetOntologyEntriesByRefSource() throws Exception { OntologyEntryEJB3DAO<OntologyTerm> dao = (OntologyEntryEJB3DAO<OntologyTerm>) daoFactory.getOntologyEntryDAO(OntologyTerm.class); List<OntologyTerm> result = dao.getOntologyEntriesByRefSource("CHEBI"); assertNotNull(result); assertEquals(2, result.size()); }