@Test
public void testPreservingAromaticity() throws Exception {

    IAtomContainer molecule = builder.newInstance(IAtomContainer.class);
    molecule.addAtom(builder.newInstance(IAtom.class, "F"));
    molecule.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule.addBond(0, 1, IBond.Order.SINGLE);
    molecule.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule.addBond(1, 2, IBond.Order.DOUBLE);
    molecule.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule.addBond(2, 3, IBond.Order.SINGLE);
    molecule.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule.addBond(3, 4, IBond.Order.DOUBLE);
    molecule.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule.addBond(4, 5, IBond.Order.SINGLE);
    molecule.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule.addBond(5, 6, IBond.Order.DOUBLE);
    molecule.addBond(6, 1, IBond.Order.SINGLE);
    addExplicitHydrogens(molecule);
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule);
    lpcheck.saturate(molecule);
    boolean isAromatic = Aromaticity.cdkLegacy().apply(molecule);
    Assert.assertTrue("Molecule is expected to be marked aromatic!", isAromatic);
    Assert.assertTrue("Bond is expected to be marked aromatic!",
            molecule.getBond(1).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!",
            molecule.getBond(2).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!",
            molecule.getBond(3).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!",
            molecule.getBond(4).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!",
            molecule.getBond(5).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!",
            molecule.getBond(6).getFlag(CDKConstants.ISAROMATIC));
    StructureResonanceGenerator gRI = new StructureResonanceGenerator(false);
    IAtomContainerSet setOfMolecules = gRI.getStructures(molecule);
    Assert.assertEquals(5, setOfMolecules.getAtomContainerCount());
    IAtomContainer prod1 = setOfMolecules.getAtomContainer(1);
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod1.getBond(1).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod1.getBond(2).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod1.getBond(3).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod1.getBond(4).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod1.getBond(5).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod1.getBond(6).getFlag(CDKConstants.ISAROMATIC));
    IAtomContainer prod2 = setOfMolecules.getAtomContainer(2);
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod2.getBond(1).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod2.getBond(2).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod2.getBond(3).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod2.getBond(4).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod2.getBond(5).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod2.getBond(6).getFlag(CDKConstants.ISAROMATIC));
    IAtomContainer prod3 = setOfMolecules.getAtomContainer(3);
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod3.getBond(1).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod3.getBond(2).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod3.getBond(3).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod3.getBond(4).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod3.getBond(5).getFlag(CDKConstants.ISAROMATIC));
    Assert.assertTrue("Bond is expected to be marked aromatic!", prod3.getBond(6).getFlag(CDKConstants.ISAROMATIC));
}