ReplayablePseudoRandom { public double random() { long increment = 1013904223; long multiplier = 1664525; double modulus = Math.pow(2, 32); seed = (this.getSeed() * multiplier + increment) % modulus; return seed; } ReplayablePseudoRandom();  ReplayablePseudoRandom(double seed); double random(); int nextInt(int bound); double nextDouble(); boolean nextBoolean(); float nextFloat(); double getSeed(); void setSeed(double seed);  }
@Test public void randomShouldNotFollowASequenceAtLeastFor1000FirstTrial() { double number = random.random(); for (int i = 0; i < 1000; i++) { assertNotEquals(number, random.random()); } }