### Question:
RulesRep extends DefaultRepBase { public List<FitPolicyRule> findAllFitPolicyRules() { return fitPolicyRuleDao.findAll(); } RulesRep();  RulesRep(final EntityManager entityManager); List<PersistentRule> getGlobalRules(); List<PersistentRule> getDatacenterRules(final Integer idDatacenter); List<EnterpriseExclusionRule> findAllEnterpriseExclusionRules(); EnterpriseExclusionRule findEnterpriseExclusionRuleById(final Integer id); void deleteEnterpriseExclusionRule(final EnterpriseExclusionRule enterpriseExclusionRule); EnterpriseExclusionRule insertEnterpriseExclusionRule(final EnterpriseExclusionRule rule); List<FitPolicyRule> findAllFitPolicyRules(); FitPolicyRule findFitPolicyRuleById(final Integer id); FitPolicyRule insertFitPolicyRule(final FitPolicyRule rule); List<MachineLoadRule> findAllMachineLoadRules(); MachineLoadRule findMachineLoadRuleById(final Integer id); List<MachineLoadRule> findMachineLoadRuleByMachine(final Integer id); List<MachineLoadRule> findMachineLoadRuleByRack(final Rack rack); List<MachineLoadRule> findMachineLoadRuleByRackIncludingMachines(final Rack rack); void deleteMachineLoadRule(final MachineLoadRule machineLoadRule); MachineLoadRule insertMachineLoadRule(final MachineLoadRule rule); Set<EnterpriseDto> findEnterprises(final EnterpriseExclusionRule eeR); void deleteFitPolicyRule(final FitPolicyRule fitPolicyRule); FitPolicyRule getFitPolicyForDatacenter(final Integer datacenterId); FitPolicyRule getGlobalFitPolicy(); List<MachineLoadRule> getMachineLoadForDatacenter(final Integer datacenterId);  }### Answer:
@Test public void test_findAllFitPolicyRules() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { FitPolicyRule fpr1 = fitPolicyRuleGenerator.createUniqueInstance(); FitPolicyRule fpr2 = fitPolicyRuleGenerator.createUniqueInstance(); List<Object> allToPersist = new ArrayList<Object>(); fitPolicyRuleGenerator.addAuxiliaryEntitiesToPersist(fpr1, allToPersist); fitPolicyRuleGenerator.addAuxiliaryEntitiesToPersist(fpr2, allToPersist); persistAll(ds(), allToPersist, fpr1, fpr2); EntityManager em = ds().createEntityManagerAndBeginReadWriteTransaction(); RulesRep rep = new RulesRep(ds().createEntityManagerAndBeginRollbackTransaction()); List<FitPolicyRule> result = rep.findAllFitPolicyRules(); assertNotNull(result); assertEquals(result.size(), 2); }