BinaryChromosome extends AbstractListChromosome<Integer> { public static List<Integer> randomBinaryRepresentation(int length) { List<Integer> rList= new ArrayList<Integer> (length); for (int j=0; j<length; j++) { rList.add(GeneticAlgorithm.getRandomGenerator().nextInt(2)); } return rList; } BinaryChromosome(List<Integer> representation);  BinaryChromosome(Integer[] representation); static List<Integer> randomBinaryRepresentation(int length);  }
@Test public void testRandomConstructor() { for (int i=0; i<20; i++) { new DummyBinaryChromosome(BinaryChromosome.randomBinaryRepresentation(10)); } }