@Test
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
public void testGetEnforcementJobs() {

    List<IEnforcementJob> jobs = service.getEnforcementJobs();
    int oldSize = jobs.size();
    
    IAgreement agreementStored = saveAgreement();        
    
    IEnforcementJob expected = newEnforcementJob(agreementStored);
    try {
        enforcementJobDao.save(expected);
    } catch (Exception e) {
        e.printStackTrace();
    }
    jobs = service.getEnforcementJobs();
    
    assertEquals(oldSize + 1, jobs.size());
    
    for (IEnforcementJob actual : jobs) {
        if (expected.getId().equals(actual.getId())) {
            assertTrue(equalJobs(expected, actual));
            return;
        }
    }
    fail("new job not found in jobs");
}