TournamentSelect extends SelectionOperation implements Stochastic { public void doOperation(Individual operand) {} TournamentSelect(int size, int tourSize, RandomNumberGenerator rand);  TournamentSelect(RandomNumberGenerator rand, Properties p);  TournamentSelect(); void setProperties(Properties p); void doOperation(Individual operand); void doOperation(List<Individual> operands); void getTour(List<Individual> operands); void selectFromTour(); void setRNG(RandomNumberGenerator m); RandomNumberGenerator getRNG();  }
@Test public void testDoOperation_List() { System.out.println("* TournamentSelect: doOperation"); TournamentSelect instance = new TournamentSelect(2,2,new MersenneTwisterFast(0)); instance.doOperation(operands); assertEquals(instance.getSelectedPopulation().size(), 2); assertEquals(instance.getSelectedPopulation().get(0).getFitness().getDouble(),1.0,0.001); assertEquals(instance.getSelectedPopulation().get(1).getFitness().getDouble(), 4.0, 0.001); assertNotSame(instance.getSelectedPopulation().get(0),operands.get(9)); assertNotSame(instance.getSelectedPopulation().get(1),operands.get(6)); }