RouletteWheel extends SelectionOperation implements Stochastic { public void setRNG(RandomNumberGenerator m) { this.rng = m; } RouletteWheel(int size, RandomNumberGenerator rng);  RouletteWheel(); @Override void setProperties(Properties p); @Override void doOperation(Individual operand); void doOperation(List<Individual> operands); void rankPopulation(List<Individual> operands); RandomNumberGenerator getRNG(); void setRNG(RandomNumberGenerator m);  }
@Test public void testSetRNG() { System.out.println("setRNG"); RandomNumberGenerator m = new MersenneTwisterFast(); RouletteWheel instance = new RouletteWheelMock(); instance.setRNG(m); RandomNumberGenerator result = instance.getRNG(); assertEquals(true, result instanceof MersenneTwisterFast); }