RandomNumber implements Serializable { public int generateMersenneTwisterRandomNumber(int n, long seed) { rg.setSeed(seed); return rg.nextInt(n); }  int generateMersenneTwisterRandomNumber(int n, long seed);  }
@Test public void testGenerateMersenneTwisterRandomNumber() { Assert.assertEquals("Expected next random number to be 444", 444, rn.generateMersenneTwisterRandomNumber(1024, 42)); Assert.assertEquals("Expected next random number to be 748", 748, rn.generateMersenneTwisterRandomNumber(1024, 444)); }