### Question:
OntologyEntryEJB3DAO extends AnnotatableEJB3DAO<T> implements OntologyEntryDAO<T> { public List<String> getOntologyEntryAccsByRefSource(String refSourceAcc) { return entityManager.createQuery("SELECT distinct ot.acc " + "FROM OntologyEntry ot " + "WHERE lower(ot.source.acc) = lower(:refSourceName)") .setParameter("refSourceName", refSourceAcc) .getResultList(); } 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 testGetOntologyEntryAccsByRefSource() throws Exception { OntologyEntryEJB3DAO<OntologyTerm> dao = (OntologyEntryEJB3DAO<OntologyTerm>) daoFactory.getOntologyEntryDAO(OntologyTerm.class); List<String> result = dao.getOntologyEntryAccsByRefSource("CHEBI"); assertNotNull ( "Null result!", result ); assertEquals ( "Wrong # of results!", 2, result.size() ); }