### Question:
ToPhenotype implements Function<IWildcardChromosome, Phenotype<EnumGene<WildcardGene>, Double>> { @Override public Phenotype<EnumGene<WildcardGene>, Double> apply(final IWildcardChromosome chromosome) { final Genotype<EnumGene<WildcardGene>> genotype = ToGenotype.get(chromosome); return Phenotype.of(genotype, currentGeneration, fitness); } ToPhenotype(final int currentGeneration); @Override Phenotype<EnumGene<WildcardGene>, Double> apply(final IWildcardChromosome chromosome);  }### Answer:
@Test public void testFunction() { final IWildcardChromosome anyChromosome = LcsObjects.anyChromosome(TRUE, TRUE, TRUE, TRUE); final Phenotype<EnumGene<WildcardGene>, Double> result = new ToPhenotype(1).apply(anyChromosome); Assertions.assertThat(result).isNotNull(); final Chromosome<EnumGene<WildcardGene>> chromosome = result.getGenotype().getChromosome(0); Assertions.assertThat(chromosome.getGene().getAllele()).isEqualTo(TRUE); }