@Test
public void testCyclopentadienyl() throws Exception {

    IAtomContainer mol = new AtomContainer();
    mol.addAtom(new Atom("C"));
    mol.getAtom(0).setFormalCharge(-1);
    for (int i = 1; i < 5; i++) {
        mol.addAtom(new Atom("C"));
        mol.getAtom(i).setHybridization(IAtomType.Hybridization.SP2);
        mol.addBond(i - 1, i, IBond.Order.SINGLE);
    }
    mol.addBond(0, 4, IBond.Order.SINGLE);
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
    Assert.assertTrue("Expected the molecule to be aromatic.",
            DoubleBondAcceptingAromaticityDetector.detectAromaticity(mol));
    Iterator<IAtom> atoms = mol.atoms().iterator();
    while (atoms.hasNext()) {
        Assert.assertTrue(atoms.next().getFlag(CDKConstants.ISAROMATIC));
    }
}