@Test @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public void testGetEnforcementJob() { IAgreement agreementStored = saveAgreement(); EnforcementJob expected = newEnforcementJob(agreementStored); try { enforcementJobDao.save(expected); } catch (Exception e) { e.printStackTrace(); } IEnforcementJob actual = service.getEnforcementJob(expected.getId()); assertTrue(equalJobs(expected, actual)); actual = service.getEnforcementJob(-1L); assertNull(actual); }
@Override public IEnforcementJob getEnforcementJob(Long id) { return enforcementJobDAO.getById(id); }
EnforcementService implements IEnforcementService { @Override public IEnforcementJob getEnforcementJob(Long id) { return enforcementJobDAO.getById(id); } }
EnforcementService implements IEnforcementService { @Override public IEnforcementJob getEnforcementJob(Long id) { return enforcementJobDAO.getById(id); }  }
EnforcementService implements IEnforcementService { @Override public IEnforcementJob getEnforcementJob(Long id) { return enforcementJobDAO.getById(id); }  @Override IEnforcementJob getEnforcementJob(Long id); @Override IEnforcementJob getEnforcementJobByAgreementId(String agreementId); @Override List<IEnforcementJob> getEnforcementJobs(); @Override IEnforcementJob createEnforcementJob(IEnforcementJob job); @Override IEnforcementJob createEnforcementJob(String agreementId); @Override boolean deleteEnforcementJobByAgreementId(String agreementId); @Override boolean startEnforcement(String agreementId); @Override boolean stopEnforcement(String agreementId); @Override void saveEnforcementResult(IAgreement agreement,
            Map<IGuaranteeTerm, GuaranteeTermEvaluationResult> enforcementResult); void enforceReceivedMetrics(
            IAgreement agreement, String guaranteeTermName, List<IMonitoringMetric> metrics); @Override void doEnforcement(IAgreement agreement,
            Map<IGuaranteeTerm, List<IMonitoringMetric>> metrics); @Override void saveCheckedGuaranteeTerm(IGuaranteeTerm term); }
EnforcementService implements IEnforcementService { @Override public IEnforcementJob getEnforcementJob(Long id) { return enforcementJobDAO.getById(id); }  @Override IEnforcementJob getEnforcementJob(Long id); @Override IEnforcementJob getEnforcementJobByAgreementId(String agreementId); @Override List<IEnforcementJob> getEnforcementJobs(); @Override IEnforcementJob createEnforcementJob(IEnforcementJob job); @Override IEnforcementJob createEnforcementJob(String agreementId); @Override boolean deleteEnforcementJobByAgreementId(String agreementId); @Override boolean startEnforcement(String agreementId); @Override boolean stopEnforcement(String agreementId); @Override void saveEnforcementResult(IAgreement agreement,
            Map<IGuaranteeTerm, GuaranteeTermEvaluationResult> enforcementResult); void enforceReceivedMetrics(
            IAgreement agreement, String guaranteeTermName, List<IMonitoringMetric> metrics); @Override void doEnforcement(IAgreement agreement,
            Map<IGuaranteeTerm, List<IMonitoringMetric>> metrics); @Override void saveCheckedGuaranteeTerm(IGuaranteeTerm term);  }