### Question:
EnterpriseDAO extends DefaultDAOBase<Integer, Enterprise> { public boolean existsAnyWithName(final String name) { assert !StringUtils.isEmpty(name); return existsAnyByCriterions(nameEqual(name)); } EnterpriseDAO();  EnterpriseDAO(final EntityManager entityManager); @Override List<Enterprise> findAll(); List<Enterprise> findAll(Integer firstElem, final Integer numResults); List<Enterprise> findByNameAnywhere(final String name); List<Enterprise> findByPricingTemplate(Integer firstElem, final PricingTemplate pt,
        final boolean included, final String filterName, final Integer numResults,
        final Integer idEnterprise); @Override void persist(final Enterprise enterprise); boolean existsAnyWithName(final String name); boolean existsAnyOtherWithName(final Enterprise enterprise, final String name); DefaultEntityCurrentUsed getEnterpriseResourceUsage(final int enterpriseId); boolean existAnyEnterpriseWithPricingTemplate(final PricingTemplate pricingTemplate);  }### Answer:
@Test public void existsAnyWithName() { Enterprise enterprise1 = eg().createInstance("abcd"); ds().persistAll(enterprise1); EnterpriseDAO dao = createDaoForReadWriteTransaction(); assertTrue(dao.existsAnyWithName("aBCd")); assertFalse(dao.existsAnyWithName("inexistent")); }