@Test
public void testOxygen2() throws Exception {

    IAtomContainer mol = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
    IAtom o1 = DefaultChemObjectBuilder.getInstance().newInstance(IAtom.class, "O");
    IAtom o2 = DefaultChemObjectBuilder.getInstance().newInstance(IAtom.class, "O");
    IAtom h1 = DefaultChemObjectBuilder.getInstance().newInstance(IAtom.class, "H");
    IAtom h2 = DefaultChemObjectBuilder.getInstance().newInstance(IAtom.class, "H");
    IBond bond1 = DefaultChemObjectBuilder.getInstance().newInstance(IBond.class, h1, o1, IBond.Order.SINGLE);
    IBond bond2 = DefaultChemObjectBuilder.getInstance().newInstance(IBond.class, o1, o2, IBond.Order.SINGLE);
    IBond bond3 = DefaultChemObjectBuilder.getInstance().newInstance(IBond.class, o2, h2, IBond.Order.SINGLE);
    mol.addAtom(o1);
    mol.addAtom(o2);
    mol.addAtom(h1);
    mol.addAtom(h2);
    mol.addBond(bond1);
    mol.addBond(bond2);
    mol.addBond(bond3);
    StructGenMatcher matcher = new StructGenMatcher();
    IAtomType matched;
    matched = matcher.findMatchingAtomType(mol, mol.getAtom(0));
    assertAtomType(testedAtomTypes, "O2", matched);
    matched = matcher.findMatchingAtomType(mol, mol.getAtom(1));
    assertAtomType(testedAtomTypes, "O2", matched);
    matched = matcher.findMatchingAtomType(mol, mol.getAtom(2));
    assertAtomType(testedAtomTypes, "H1", matched);
    matched = matcher.findMatchingAtomType(mol, mol.getAtom(3));
    assertAtomType(testedAtomTypes, "H1", matched);
}