@Test public void testJobTTL() {

    JobManager jm = new JobManager();
    MorphiaService ms = new MorphiaService();
    LGJobDAOImpl dao = new LGJobDAOImpl(LGJob.class, ms.getDatastore());
    String jobId = UUID.randomUUID().toString();
    ArrayList<String> alist = new ArrayList();
    alist.add("HelloWorld");
    alist.add("PlusBang");
    alist.add("HelloWorldPython");
    alist.add("LongRunningTestAdapter");
    alist.add("LongRunningPython");
    JSONObject jobConfig = new JSONObject();
    jobConfig.put("job_id",jobId);
    jobConfig.put("ttl",-300); // trick it into thinking already expired
    jobConfig.put("depth",3);
    jobConfig.put("description","test job for TTL");
    LGPayload lgp = new LGPayload(jobConfig);
    // Create test job
    LGJob testJob = new LGJob(jobId, alist, jobConfig);
    dao.save(testJob);
    // Query and test that job_config survives
    LGJob lookup = dao.getByJobId(jobId);
    // TODO: REDO THIS TEST
    //assertEquals(lookup.getTTL(),-300);
    //assertTrue(jm.hasJobExpired(lookup));
    //assertEquals(lookup.getStatus(), LGJob.STATUS_EXPIRED);
    jm.deleteJob(lookup);
}