@Test
public void testMoleculeInvariance() throws Exception, CloneNotSupportedException {

    IAtomContainer mol = TestMoleculeFactory.makePyrrole();
    IAtomContainer clone = (IAtomContainer) mol.clone();
    // should pass since we have not explicitly detected aromaticity
    for (IAtom atom : mol.atoms()) {
        Assert.assertFalse(atom.getFlag(CDKConstants.ISAROMATIC));
    }
    String diff1 = AtomContainerDiff.diff(mol, clone);
    Assert.assertEquals("", diff1);
    ExtendedFingerprinter fprinter = new ExtendedFingerprinter();
    BitSet fp = fprinter.getBitFingerprint(mol).asBitSet();
    Assert.assertNotNull(fp);
    String diff2 = AtomContainerDiff.diff(mol, clone);
    Assert.assertTrue("There was a difference\n" + diff2, diff2.equals(""));
}