@Test
// tests selection of more Individuals than given from one Population
public void testSelect1() throws Exception {

    SimplePopulation popIn1 = new SimplePopulation();
    Individual[] individuals1 = new SimpleIndividual[2];
    for (int i = 0; i < individuals1.length; i++){
        individuals1[i] = new SimpleIndividual(0, 0.0, new SimplePhenotypeRepresentation());
        individuals1[i].setFitness((i-1)*(i-1)); // shifted parabola with prescription y = x^2 and bottom at position (x = -1).
    }
    popIn1.setIndividuals(individuals1);
    this.operator.setInputArity(1);
    this.operator.setOutputArity(1);
    this.operator.setIndividualsPerPopulation(4);
    Population[] popsOut = this.operator.select(new SimplePopulation[]{popIn1});
    assertTrue(popsOut.length == 1);
    assertTrue(popsOut[0].getIndividuals().length == 4);
    for (Individual ind : popsOut[0].getIndividuals()){
        assertTrue(ind != null);
    }
}