@Test
// test whether majority of selected Individuals is the fittest
public void testSelect1() throws Exception {

    Individual ind1 = new SimpleIndividual(0, 0.0, new SimplePhenotypeRepresentation());
    ind1.setFitness(10.0);
    Individual ind2 = new SimpleIndividual(0, 0.0, new SimplePhenotypeRepresentation());
    ind1.setFitness(1.0);
    Population popIn1 = new SimplePopulation(new Individual[]{ind2, ind1});
    this.operator.setInputArity(1);
    this.operator.setIndividualsPerPopulation(100);
    this.operator.setOutputArity(1);
    Population[] popsOut = this.operator.select(new Population[]{popIn1});
    assertTrue(popsOut != null);
    assertTrue(popsOut.length == 1);
    Population outPop = popsOut[0];
    assertTrue(outPop.getIndividuals().length == 100);
    int fittestCount = 0;
    for (Individual ind : outPop.getIndividuals()){
        if (ind == ind1){
            fittestCount++;
        }
    }
    assertTrue(((double)fittestCount/100) > 0.65);
}