@Test
public void testIsDAG() {

  JobContainerRequest dbJob = new JobContainerRequest("db", 1, 0L, 1, 0, 1, "", new ArrayList<>());
  JobContainerRequest workerJob = new JobContainerRequest("worker", 1, 0L, 1, 0, 1, "", Arrays.asList("db", "ps"));
  JobContainerRequest psJob = new JobContainerRequest("ps", 1, 0L, 1, 0, 1, "", Arrays.asList("db"));
  JobContainerRequest dbWriterJob = new JobContainerRequest("dbwriter", 1, 0L, 1, 0, 1, "", new ArrayList<>());
  JobContainerRequest cleanupJob = new JobContainerRequest("cleanup", 1, 0L, 1, 0, 1, "", Arrays.asList("db", "worker"));
  List<JobContainerRequest> requests = Arrays.asList(dbJob, workerJob, psJob, dbWriterJob, cleanupJob);
  boolean actualIsDAG = TaskScheduler.isDAG(requests);
  assertTrue(actualIsDAG);
}