Floats { static Gen<Float> fromZeroToOne() { return Generate.range(0, 1 << 24, 0).map(i -> i / (float)(1 << 24)); }    }
@Test public void shouldShrinkOneTowardsZero() { Gen<Float> testee = Floats.fromZeroToOne(); assertThatGenerator(testee).shrinksTowards(0f); }
@Test public void shouldGenerateZeroAndOne() { Gen<Float> testee = Floats.fromZeroToOne(); assertThatGenerator(testee).generatesTheMinAndMax(0f, 1f); }
@Test public void shouldGenerateDistinctValuesUsingFromZeroToOne() { Gen<Float> testee = Floats.fromZeroToOne(); assertThatGenerator(testee).generatesAtLeastNDistinctValues(1000); }