@Test
public void getAverageFitness() {

    double res = population.getAverageFitness();
    Assert.assertEquals(res, Double.NaN, PRECISION);
    population.calculateFitnessForAll(fitnessFunction);
    res = population.getAverageFitness();
    Assert.assertEquals(res, 99.0, PRECISION);
}