@Test
public void testGenerate_Rotation() {

    AtomHashGenerator atomGenerator = mock(AtomHashGenerator.class);
    Xorshift xorshift = new Xorshift();
    IAtomContainer container = mock(IAtomContainer.class);
    MoleculeHashGenerator generator = new BasicMoleculeHashGenerator(atomGenerator, new Xorshift());
    when(atomGenerator.generate(container)).thenReturn(new long[]{5L, 5L, 5L, 5L});
    long hashCode = generator.generate(container);
    verify(atomGenerator, times(1)).generate(container);
    verifyNoMoreInteractions(atomGenerator, container);
    long expected = 2147483647L ^ 5L ^ xorshift.next(5L) ^ xorshift.next(xorshift.next(5L))
            ^ xorshift.next(xorshift.next(xorshift.next(5L)));
    assertThat(hashCode, is(expected));
}