@Test
public void testDetectNaphtalene() throws Exception {

    logger.info("Entering testDetectNaphtalene.");
    IAtomContainer mol = null;
    String filename = "data/cml/naphtalene.cml";
    mol = readCMLMolecule(filename);
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
    Aromaticity.cdkLegacy().apply(mol);
    IAtomContainerSet acSet = ConjugatedPiSystemsDetector.detect(mol);
    Assert.assertEquals(1, acSet.getAtomContainerCount());
    IAtomContainer ac = acSet.getAtomContainer(0);
    Assert.assertEquals(10, ac.getAtomCount());
    Assert.assertEquals(11, ac.getBondCount());
    for (int i = 0; i < ac.getAtomCount(); i++) {
        Assert.assertTrue(mol.contains(ac.getAtom(i)));
    }
    for (int i = 0; i < ac.getBondCount(); i++) {
        Assert.assertTrue(mol.contains(ac.getBond(i)));
    }
}