@Test
public void adenineRingPreference() throws Exception {

    IAtomContainer adenine = TestMoleculeFactory.makeAdenine();
    Map<IBond, IAtomContainer> ringMap = StandardBondGenerator.ringPreferenceMap(adenine);
    int nSize5 = 0, nSize6 = 0;
    for (IBond bond : adenine.bonds()) {
        IAtomContainer ring = ringMap.get(bond);
        // exocyclic bond
        if (ring == null) continue;
        int size = ring.getAtomCount();
        if (size == 5) nSize5++;
        if (size == 6) nSize6++;
    }
    // 6 bonds should point to the six member ring
    // 4 bonds should point to the five member ring
    assertThat(nSize5, is(4));
    assertThat(nSize6, is(6));
}