@Test
public void testRotation() throws Exception {

    AtomHashGenerator seedMock = mock(AtomHashGenerator.class);
    IAtomContainer container = mock(IAtomContainer.class);
    BasicAtomHashGenerator generator = new BasicAtomHashGenerator(mock(AtomHashGenerator.class), new Xorshift(), 2);
    int[][] graph = new int[][]{{1, 2, 3}, {0}, {0}, {0}};
    // simulate 3 identical neighbors
    long[] invs = new long[]{21, 31, 31, 31};
    long[] unique = new long[4];
    long[] rotated = new long[4];
    long value = generator.next(graph, 0, invs, unique, rotated);
    assertThat(unique, is(new long[]{31, 0, 0, 0}));
    assertThat(rotated, is(new long[]{generator.rotate(31, 2), 0, 0, 0}));
    assertThat(value, is(generator.distribute(21) ^ 31 ^ generator.rotate(31) ^ generator.rotate(31, 2)));
}