@Test
public void testAgentInstanceRequiredMigration() {

    Task job1Task0 = jobOperations.getTasks("job1").get(0);
    dataGenerator.place("active1", job1Task0);
    dataGenerator.setQuota("job1", 1);
    job1Task0 = jobOperations.findTaskById(job1Task0.getId()).get().getRight();
    dataGenerator.addInstanceAttribute(job1Task0.getTaskContext().get(TaskAttributes.TASK_ATTRIBUTES_AGENT_INSTANCE_ID), RelocationAttributes.RELOCATION_REQUIRED, "true");
    Optional<Pair<Node, List<Task>>> results = newDescheduler(Collections.emptyMap()).nextBestMatch();
    assertThat(results).isNotEmpty();
}