@Test
public void testCountableMACCSCount_Rings() throws Exception {

    SmilesParser parser = new SmilesParser(SilentChemObjectBuilder.getInstance());
    IFingerprinter printer = new SubstructureFingerprinter(StandardSubstructureSets.getCountableMACCSSMARTS());
    IAtomContainer mol;
    ICountFingerprint cfp;
    // Aromatic 6-rings
    mol = parser.parseSmiles("C1=CC=CC(=C1)CCCC2=CC=CC=C2");
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
    Aromaticity.cdkLegacy().apply(mol);
    cfp = printer.getCountFingerprint(mol);
    Assert.assertEquals(cfp.getCountForHash(128), 2); // 6-ring
    Assert.assertEquals(cfp.getCountForHash(111), 2); // aromaticity
    Assert.assertEquals(cfp.getCountForHash(7), 0); // 7-ring
    Assert.assertEquals(cfp.getCountForHash(82), 0); // 5-ring
    // Non-aromatic 6-rings
    mol = parser.parseSmiles("C1CC(CCC1)CCCCC2CCCCC2");
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
    Aromaticity.cdkLegacy().apply(mol);
    cfp = printer.getCountFingerprint(mol);
    Assert.assertEquals(cfp.getCountForHash(128), 2); // 6-ring
    Assert.assertEquals(cfp.getCountForHash(111), 0); // aromaticity
    Assert.assertEquals(cfp.getCountForHash(7), 0); // 7-ring
    Assert.assertEquals(cfp.getCountForHash(82), 0); // 5-ring
    // Aromatic 6-ring, 3-ring and 4-ring
    mol = parser.parseSmiles("C1CC1C(CCC2CCC2)CC3=CC=CC=C3");
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
    Aromaticity.cdkLegacy().apply(mol);
    cfp = printer.getCountFingerprint(mol);
    Assert.assertEquals(cfp.getCountForHash(128), 1); // 6-ring
    Assert.assertEquals(cfp.getCountForHash(111), 1); // aromaticity
    Assert.assertEquals(cfp.getCountForHash(10), 1); // 3-ring
    Assert.assertEquals(cfp.getCountForHash(1), 1); // 4-ring
    Assert.assertEquals(cfp.getCountForHash(7), 0); // 7-ring
    Assert.assertEquals(cfp.getCountForHash(82), 0); // 5-ring
    // Aromatic 6-ring, 3-ring and 4-ring
    mol = parser.parseSmiles("C1(CC1C(CCC2CCC2)CC3=CC=CC=C3)C(C(C(C4CC4)C5CC5)C6CC6)C7CC7");
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
    Aromaticity.cdkLegacy().apply(mol);
    cfp = printer.getCountFingerprint(mol);
    Assert.assertEquals(cfp.getCountForHash(128), 1); // 6-ring
    Assert.assertEquals(cfp.getCountForHash(111), 1); // aromaticity
    Assert.assertEquals(cfp.getCountForHash(10), 5); // 3-ring
    Assert.assertEquals(cfp.getCountForHash(1), 1); // 4-ring
    Assert.assertEquals(cfp.getCountForHash(7), 0); // 7-ring
    Assert.assertEquals(cfp.getCountForHash(82), 0); // 5-ring
}