@Test
public void testAutomaticSearchCentreActiveExample3() throws Exception {

    IReactionProcess type = new RearrangementAnionReaction();
    /* [F+]=C1-[C-]-C=C-C=C1 */
    IAtomContainer molecule = builder.newInstance(IAtomContainer.class);
    molecule.addAtom(builder.newInstance(IAtom.class, "F"));
    molecule.getAtom(0).setFormalCharge(1);
    molecule.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule.addBond(0, 1, IBond.Order.DOUBLE);
    molecule.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule.getAtom(2).setFormalCharge(-1);
    molecule.addLonePair(new LonePair(molecule.getAtom(2)));
    molecule.addBond(1, 2, IBond.Order.SINGLE);
    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);
    IAtomContainerSet setOfReactants = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainerSet.class);
    setOfReactants.addAtomContainer(molecule);
    /* initiate */
    makeSureAtomTypesAreRecognized(molecule);
    List<IParameterReact> paramList = new ArrayList<IParameterReact>();
    IParameterReact param = new SetReactionCenter();
    param.setParameter(Boolean.FALSE);
    paramList.add(param);
    type.setParameterList(paramList);
    IReactionSet setOfReactions = type.initiate(setOfReactants, null);
    Assert.assertEquals(2, setOfReactions.getReactionCount());
    Assert.assertEquals(1, setOfReactions.getReaction(0).getProductCount());
    IAtomContainer product1 = setOfReactions.getReaction(1).getProducts().getAtomContainer(0);
    /* [F+]=C1-[C=]-C-[C-]-C=C1 */
    IAtomContainer molecule2 = builder.newInstance(IAtomContainer.class);
    molecule2.addAtom(builder.newInstance(IAtom.class, "F"));
    molecule2.getAtom(0).setFormalCharge(1);
    molecule2.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule2.addBond(0, 1, IBond.Order.DOUBLE);
    molecule2.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule2.addBond(1, 2, IBond.Order.SINGLE);
    molecule2.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule2.addBond(2, 3, IBond.Order.DOUBLE);
    molecule2.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule2.getAtom(4).setFormalCharge(-1);
    molecule2.addBond(3, 4, IBond.Order.SINGLE);
    molecule2.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule2.addBond(4, 5, IBond.Order.SINGLE);
    molecule2.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule2.addBond(5, 6, IBond.Order.DOUBLE);
    molecule2.addBond(6, 1, IBond.Order.SINGLE);
    addExplicitHydrogens(molecule2);
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule2);
    lpcheck.saturate(molecule2);
    makeSureAtomTypesAreRecognized(molecule2);
    assertEquals(molecule2, product1);
    //////////////////////////////////////////////////
    IAtomContainer product2 = setOfReactions.getReaction(0).getProducts().getAtomContainer(0);
    /* F=c1ccccc1 */
    IAtomContainer molecule3 = builder.newInstance(IAtomContainer.class);
    molecule3.addAtom(builder.newInstance(IAtom.class, "F"));
    molecule3.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule3.addBond(0, 1, IBond.Order.SINGLE);
    molecule3.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule3.addBond(1, 2, IBond.Order.DOUBLE);
    molecule3.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule3.addBond(2, 3, IBond.Order.SINGLE);
    molecule3.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule3.addBond(3, 4, IBond.Order.DOUBLE);
    molecule3.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule3.addBond(4, 5, IBond.Order.SINGLE);
    molecule3.addAtom(builder.newInstance(IAtom.class, "C"));
    molecule3.addBond(5, 6, IBond.Order.DOUBLE);
    molecule3.addBond(6, 1, IBond.Order.SINGLE);
    addExplicitHydrogens(molecule3);
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule3);
    lpcheck.saturate(molecule3);
    makeSureAtomTypesAreRecognized(molecule3);
    assertEquals(molecule3, product2);
    Assert.assertEquals(12, setOfReactions.getReaction(0).getMappingCount());
}