@Test
public void testGetContainers2Groups() throws Exception {

    IAtomContainer molecule = builder.newInstance(IAtomContainer.class);
    molecule.addAtom(new Atom("C"));
    molecule.addAtom(new Atom("C"));
    molecule.addBond(0, 1, IBond.Order.SINGLE);
    molecule.getBond(0).setID("bond_0");
    molecule.addAtom(new Atom("C"));
    molecule.addBond(1, 2, IBond.Order.DOUBLE);
    molecule.getBond(1).setID("bond_1");
    molecule.addAtom(new Atom("C"));
    molecule.getAtom(3).setFormalCharge(+1);
    molecule.addBond(2, 3, IBond.Order.SINGLE);
    molecule.getBond(2).setID("bond_2");
    molecule.addAtom(new Atom("C"));
    molecule.addBond(3, 4, IBond.Order.SINGLE);
    molecule.getBond(3).setID("bond_3");
    molecule.addAtom(new Atom("C"));
    molecule.addBond(4, 5, IBond.Order.SINGLE);
    molecule.getBond(4).setID("bond_4");
    molecule.addAtom(new Atom("C"));
    molecule.addBond(5, 6, IBond.Order.DOUBLE);
    molecule.getBond(5).setID("bond_5");
    molecule.addAtom(new Atom("C"));
    molecule.addBond(6, 7, IBond.Order.SINGLE);
    molecule.getBond(6).setID("bond_6");
    molecule.getAtom(7).setFormalCharge(+1);
    addExplicitHydrogens(molecule);
    AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule);
    lpcheck.saturate(molecule);
    StructureResonanceGenerator sRG = new StructureResonanceGenerator();
    IAtomContainerSet setOfContainers = sRG.getContainers(molecule);
    Assert.assertEquals(2, setOfContainers.getAtomContainerCount());
    for (int i = 0; i < 2; i++) {
        Assert.assertEquals(3, setOfContainers.getAtomContainer(i).getAtomCount());
        Assert.assertEquals(2, setOfContainers.getAtomContainer(i).getBondCount());
    }
}