### Question:
OntologyEntryEJB3DAO extends AnnotatableEJB3DAO<T> implements OntologyEntryDAO<T> { public T getOntologyEntryByAccAndRefSource( String acc, String refSourceAcc) { return (T) getSession().createCriteria(getPersistentClass()) .add(Restrictions.eq("acc", acc)) .createCriteria("source") .add(Restrictions.eq("acc", refSourceAcc)) .uniqueResult(); } 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 testGetOntologyEntryByAccAndRefSource() throws Exception { OntologyEntryEJB3DAO dao = (OntologyEntryEJB3DAO) daoFactory.getOntologyEntryDAO(); OntologyEntry ontologyEntryByAcc = dao.getOntologyEntryByAccAndRefSource("OBI-AT1", "BII-1"); assertNotNull(ontologyEntryByAcc); }