@Test
public void selectMaximum() {

	final MSeq<Phenotype<DoubleGene, Double>> population = MSeq.ofLength(100);
	for (int i = 0, n = population.size(); i < n; ++i) {
		final Genotype<DoubleGene> gt =
			Genotype.of(DoubleChromosome.of(DoubleGene.of(i, 0, n)));
		population.set(i, Phenotype.of(gt, 12, gt.gene().doubleValue()));
	}
	final EliteSelector<DoubleGene, Double> selector = new EliteSelector<>();
	final ISeq<Phenotype<DoubleGene, Double>> selected =
		selector.select(population, 10, Optimize.MAXIMUM);
	Assert.assertEquals(
		population.get(population.length() - 1).genotype().gene().doubleValue(),
		selected.get(0).genotype().gene().doubleValue()
	);
}