### Question:
PricingCostCodeDAO extends DefaultDAOBase<Integer, PricingCostCode> { public Collection<PricingCostCode> findPricingCostCodes(final PricingTemplate pricing) { Criteria criteria = createCriteria(samePricing(pricing)); return criteria.list(); } PricingCostCodeDAO();  PricingCostCodeDAO(final EntityManager entityManager); PricingCostCode findPricingCostCode(final CostCode costCode,
        final PricingTemplate pricing); Collection<PricingCostCode> findPricingCostCodes(final PricingTemplate pricing); boolean existAnyOtherWithCostCode(final PricingCostCode pricingCostCode,
        final CostCode costCode, final PricingTemplate pricing);  }### Answer:
@Test public void findPricingCostCodes() { PricingCostCode pc1 = eg().createUniqueInstance(); PricingCostCode pc2 = eg().createUniqueInstance(); ds().persistAll(pc1.getCostCode(), pc1.getPricingTemplate().getCurrency(), pc1.getPricingTemplate(), pc1, pc2.getCostCode(), pc2.getPricingTemplate().getCurrency(), pc2.getPricingTemplate(), pc2); PricingCostCodeDAO dao = createDaoForRollbackTransaction(); Collection<PricingCostCode> pccs = dao.findPricingCostCodes(pc1.getPricingTemplate()); AssertEx.assertSize(pccs, 1); pccs = dao.findPricingCostCodes(pc2.getPricingTemplate()); AssertEx.assertSize(pccs, 1); }