@Test
public void ofAnyScalar() {

	final Codec<Integer, AnyGene<Integer>> codec = Codecs.ofScalar(
		() -> RandomRegistry.random().nextInt(1000),
		i -> i < 100
	);
	for (int i = 0; i < 1000; ++i) {
		final AnyGene<Integer> gene = codec.encoding()
			.newInstance().gene();
		assertEquals(gene.isValid(), gene.allele() < 100);
		assertTrue(gene.allele() < 1000);
		assertTrue(gene.allele() >= 0);
	}
}