Fixture-generating algorithm and implementation in Java