### Question:
RulesRep extends DefaultRepBase { public List<MachineLoadRule> findAllMachineLoadRules() { return machineLoadRuleDao.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_findAllMachineLoadRules() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Datacenter dt = datacenterGenerator.createUniqueInstance(); Rack rack = rackGenerator.createInstance(dt); Machine machine = machineGenerator.createMachine(dt, rack); MachineLoadRule dcRule = machineLoadRuleGenerator.createInstance(dt); MachineLoadRule rackrule = machineLoadRuleGenerator.createInstance(rack); MachineLoadRule machineRule = machineLoadRuleGenerator.createInstance(machine); ds().persistAll(dt, rack, machine, dcRule, rackrule, machineRule); RulesRep rep = new RulesRep(ds().createEntityManagerAndBeginRollbackTransaction()); List<MachineLoadRule> result = rep.findAllMachineLoadRules(); assertNotNull(result); assertEquals(result.size(), 3); }