MersenneTwister extends RandomEngine { @Override public int nextInt() { if (mti == N) { nextBlock(); } int y = mt[mti++]; y ^= y >>> 11; y ^= (y << 7) & TEMPERING_MASK_B; y ^= (y << 15) & TEMPERING_MASK_C; y ^= y >>> 18; return y; } MersenneTwister();  MersenneTwister(int seed);  MersenneTwister(Date d); @Override int nextInt();  }
@Test public void testDateConstructor() { RandomEngine r1 = new MersenneTwister(1275264362); RandomEngine r2 = new MersenneTwister(new Date(1275264362)); for (int i = 0; i < 100; i++) { assertEquals("date-"+i, r1.nextInt(), r2.nextInt()); } }