@Test(dataProvider = "minimalEvaluationLimits")
public void minimalEvaluation(final int limit) {

	final AtomicInteger count = new AtomicInteger();
	final Evaluator<IntegerGene, Integer> evaluator = population -> {
		count.incrementAndGet();
		return population
			.map(pt -> pt.withFitness(1))
			.asISeq();
	};
	final Codec<Integer, IntegerGene> codec = Codecs.ofScalar(IntRange.of(1, 100));
	final Engine<IntegerGene, Integer> engine =
		new Engine.Builder<>(evaluator, codec.encoding())
			.alterers(new Mutator<>(1.0))
			.build();
	final EvolutionResult<IntegerGene, Integer> result = engine.stream()
		.limit(limit)
		.collect(EvolutionResult.toBestEvolutionResult());
	Assert.assertEquals(count.get(), limit == 0 ? 0 : limit +1);
}