@Test
// test for correct distance measure and symmetric of relationship.
public void testDistance() throws Exception {

    Representation repr1 = new SimplePhenotypeRepresentation();
    repr1.setDoubleValue(new double[]{1.0, 2.3, 5.6, 1000.4});
    Individual ind1 = new SimpleIndividual(0, 0.0, repr1);
    Representation repr2 = new SimplePhenotypeRepresentation();
    repr2.setDoubleValue(new double[]{13.6, 10004.5, -11.5, -666.7});
    Individual ind2 = new SimpleIndividual(0, 0.0, repr2);
    double distance1 = this.function.distance(ind1, ind2);
    assertEquals(10140.2011, distance1, 0.0001);
    double distance2 = this.function.distance(ind2, ind1);
    assertEquals(10140.2011, distance2, 0.0001);
    distance1 = this.function.distance(ind1, ind1);
    assertTrue(distance1 == 0.0);
}