@Test
public void testFitness() {

    List<Node> removableAgents = nodeDataResolver.resolve().values().stream()
            .filter(n -> n.getServerGroupId().equals("removable1"))
            .collect(Collectors.toList());;
    String agent1 = removableAgents.get(0).getId();
    String agent2 = removableAgents.get(1).getId();
    List<Task> tasksOfJob1 = jobOperations.getTasks("job1");
    dataGenerator.placeOnAgent(agent1, tasksOfJob1.get(0), tasksOfJob1.get(1));
    dataGenerator.placeOnAgent(agent2, tasksOfJob1.get(2));
    dataGenerator.setQuota("job1", 1);
    Optional<Pair<Node, List<Task>>> results = newDescheduler(Collections.emptyMap()).nextBestMatch();
    assertThat(results).isPresent();
    assertThat(results.get().getLeft().getId()).isEqualTo(agent2);
}