### Question:
Chromosome implements Comparable<Chromosome> { public int getFitness() { return fitness; } Chromosome(String gene); String getGene(); int getFitness(); Chromosome mutate(); Chromosome[] mate(Chromosome mate); @Override int compareTo(Chromosome c); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testGetFitness() { Chromosome c1 = new Chromosome("Hello, world!"); assertEquals(0, c1.getFitness()); Chromosome c2 = new Chromosome("H5p&J;!l<X\\7l"); assertEquals(399, c2.getFitness()); Chromosome c3 = new Chromosome("Vc;fx#QRP8V\\$"); assertEquals(297, c3.getFitness()); Chromosome c4 = new Chromosome("t\\O`E_Jx$n=NF"); assertEquals(415, c4.getFitness()); }