AbstractHashGenerator { long rotate(long seed) { return pseudorandom.next(seed); } AbstractHashGenerator(Pseudorandom pseudorandom);   }
@Test public void testRotate() throws Exception { Pseudorandom pseudorandom = mock(Pseudorandom.class); AbstractHashGenerator f = new AbstractHashGenerator(pseudorandom); f.rotate(5L); verify(pseudorandom, times(1)).next(5L); }
@Test public void testRotate_N() throws Exception { Pseudorandom pseudorandom = mock(Pseudorandom.class); AbstractHashGenerator f = new AbstractHashGenerator(pseudorandom); f.rotate(0, 5); verify(pseudorandom, times(5)).next(anyLong()); }