@Test
public void example() {

	final Codec<LocalDate, LongGene> dateCodec1 = Codec.of(
		Genotype.of(LongChromosome.of(0, 10_000)),
		gt -> LocalDate.ofEpochDay(gt.gene().longValue())
	);
	final Codec<LocalDate, LongGene> dateCodec2 = Codec.of(
		Genotype.of(LongChromosome.of(1_000_000, 10_000_000)),
		gt -> LocalDate.ofEpochDay(gt.gene().longValue())
	);
	final Codec<Duration, LongGene> durationCodec = Codec.of(
		dateCodec1,
		dateCodec2,
		(d1, d2) -> Duration.ofDays(d2.toEpochDay() - d1.toEpochDay())
	);
	final Engine<LongGene, Long> engine = Engine
		.builder(Duration::toMillis, durationCodec)
		.build();
	final Phenotype<LongGene, Long> pt = engine.stream()
		.limit(100)
		.collect(EvolutionResult.toBestPhenotype());
	//System.out.println(pt);
	final Duration duration = durationCodec.decoder()
		.apply(pt.genotype());
	//System.out.println(duration);
}