@Test
  public void testScheduleDag() {
    HashSet<VM> vms = new HashSet<VM>();
    for (int i = 0; i < 10; i++) {
      VMStaticParams vmStaticParams = VMStaticParams.getDefaults();

      VM vm = new VM(vmStaticParams, cloudsim);
      vms.add(vm);
      cloudsim.send(engine.getId(), cloud.getId(), 0.0, WorkflowEvent.VM_LAUNCH, vm);
    }

    DAG dag = new DAG();
    for (int i = 0; i < 100; i++) {
      Task task = new Task("TASK" + i, "transformation", (i % 10), VMType.DEFAULT_VM_TYPE);
      dag.addTask(task);
    }

    List<DAG> dags = new ArrayList<DAG>();
    dags.add(dag);

    // FIXME (_mequrel): looks awkward, a comment should be added or some logic inversed
    new EnsembleManager(dags, engine, cloudsim);

    cloudsim.startSimulation();

    assertEquals(vms.size(), engine.getAvailableVMs().size());
    assertEquals(0, engine.getQueuedJobs().size());

    jobLog.printJobs("testEnsembleDynamicSchedulerDag");
  }
  @Test
  public void testScheduleDag100() {
    HashSet<VM> vms = new HashSet<VM>();
    for (int i = 0; i < 10; i++) {
      VMStaticParams vmStaticParams = VMStaticParams.getDefaults();

      VM vm = new VM(vmStaticParams, cloudsim);
      vms.add(vm);
      cloudsim.send(engine.getId(), cloud.getId(), 0.0, WorkflowEvent.VM_LAUNCH, vm);
    }

    DAG dag = DAGParser.parseDAG(new File("dags/CyberShake_100.dag"));

    List<DAG> dags = new ArrayList<DAG>();
    dags.add(dag);

    // FIXME (_mequrel): looks awkward, a comment should be added or some logic inversed
    new EnsembleManager(dags, engine, cloudsim);

    cloudsim.startSimulation();

    assertEquals(vms.size(), engine.getAvailableVMs().size());
    assertEquals(0, engine.getQueuedJobs().size());

    jobLog.printJobs("testEnsembleDynamicSchedulerDag_CyberShake_100");
  }
  @Test
  public void testScheduleVMS() {
    HashSet<VM> vms = new HashSet<VM>();
    for (int i = 0; i < 10; i++) {
      VMStaticParams vmStaticParams = VMStaticParams.getDefaults();

      VM vm = new VM(vmStaticParams, cloudsim);
      vm.setProvisioningDelay(0.0);
      vm.setDeprovisioningDelay(0.0);
      vms.add(vm);
      cloudsim.send(engine.getId(), cloud.getId(), 0.1, WorkflowEvent.VM_LAUNCH, vm);
    }

    cloudsim.startSimulation();

    assertEquals(vms.size(), engine.getAvailableVMs().size());
  }