### Question:
XorShiftRandom { public long random() { value = random(value); return value; } XorShiftRandom(long initialSeed); long random(); static long random(final long randomStart);  }### Answer:
@Test public void testThreadsafeXorShiftRandom() { XorShiftRandom random = new ThreadsafeXorShiftRandom(); Set<Long> randomVals = new HashSet<Long>(10); int randomCount = 100; for (int i = 0; i < randomCount; i ++) { randomVals.add(random.random()); } Assert.assertEquals(randomVals.size(), 100); }