@Test
public void testGenerate_Simple() throws Exception {

    AtomHashGenerator seedMock = mock(AtomHashGenerator.class);
    IAtomContainer container = mock(IAtomContainer.class);
    SuppressedAtomHashGenerator generator = new SuppressedAtomHashGenerator(mock(AtomHashGenerator.class),
            new Xorshift(), AtomSuppression.unsuppressed(), 2);
    // no suppression
    {
        // first iteration, values are distributed and then neighbours xor'd
        // in. when two neighbours have the same value the second should be
        // rotated
        long[] first = new long[]{generator.distribute(1) ^ 2L,
                generator.distribute(2L) ^ 1L ^ generator.rotate(1L), generator.distribute(1) ^ 2L};
        long[] second = new long[]{generator.distribute(first[0]) ^ first[1],
                generator.distribute(first[1]) ^ first[0] ^ generator.rotate(first[2]),
                generator.distribute(first[2]) ^ first[1]};
        assertThat(generator.generate(new long[]{1L, 2L, 1L}, StereoEncoder.EMPTY, new int[][]{{1}, {0, 2}, {1}},
                Suppressed.none()), is(second));
    }
    // vertex '2' supressed
    BitSet suppressed = new BitSet();
    suppressed.set(2);
    {
        long[] first = new long[]{generator.distribute(1) ^ 2L, generator.distribute(2L) ^ 1L, // generator.rotate(1L) not included is '[2]' is suppressed
                0L,};
        long[] second = new long[]{generator.distribute(first[0]) ^ first[1], // generator.rotate(first[2]) not included is '[2]' is suppressed
                generator.distribute(first[1]) ^ first[0], 0L};
        assertThat(generator.generate(new long[]{1L, 2L, 1L}, StereoEncoder.EMPTY, new int[][]{{1}, {0, 2}, {1}},
                Suppressed.fromBitSet(suppressed)), is(second));
    }
}