@Test
public void testAutomatic_Set_Active_Atom() throws Exception {

    /*
     * ionize(>C=O): C=CCC(=O)CC -> C=CCC(=O*)CC, without setting the
     * reactive center
     */
    IAtomContainer reactant = builder.newInstance(IAtomContainer.class);//Smiles("C=CCC(=O)CC")
    reactant.addAtom(builder.newInstance(IAtom.class, "C"));
    reactant.addAtom(builder.newInstance(IAtom.class, "C"));
    reactant.addAtom(builder.newInstance(IAtom.class, "C"));
    reactant.addAtom(builder.newInstance(IAtom.class, "C"));
    reactant.addAtom(builder.newInstance(IAtom.class, "O"));
    reactant.addAtom(builder.newInstance(IAtom.class, "C"));
    reactant.addAtom(builder.newInstance(IAtom.class, "C"));
    reactant.addBond(0, 1, IBond.Order.DOUBLE);
    reactant.addBond(1, 2, IBond.Order.SINGLE);
    reactant.addBond(2, 3, IBond.Order.SINGLE);
    reactant.addBond(3, 4, IBond.Order.DOUBLE);
    reactant.addBond(3, 5, IBond.Order.SINGLE);
    reactant.addBond(5, 6, IBond.Order.SINGLE);
    addExplicitHydrogens(reactant);
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(reactant);
    lpcheck.saturate(reactant);
    IAtomContainerSet setOfReactants = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainerSet.class);
    setOfReactants.addAtomContainer(reactant);
    /* initiate */
    makeSureAtomTypesAreRecognized(reactant);
    IReactionProcess type = new ElectronImpactNBEReaction();
    IReactionSet setOfReactions = type.initiate(setOfReactants, null);
    Assert.assertEquals(1, setOfReactions.getReactionCount());
    Assert.assertEquals(1, setOfReactions.getReaction(0).getProductCount());
    IAtomContainer molecule = setOfReactions.getReaction(0).getProducts().getAtomContainer(0);
    Assert.assertEquals(1, molecule.getAtom(4).getFormalCharge().intValue());
    Assert.assertEquals(1, molecule.getConnectedSingleElectronsCount(molecule.getAtom(4)));
}