@Test
public void testRingClosure() throws Exception {

    SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
    IAtomContainer mol = sp.parseSmiles("C12(OC1)CCC2");
    Assert.assertEquals(6, mol.getAtomCount());
    Assert.assertEquals("C", mol.getAtom(0).getSymbol());
    Assert.assertEquals("O", mol.getAtom(1).getSymbol());
    Assert.assertEquals("C", mol.getAtom(2).getSymbol());
    Assert.assertEquals(4, mol.getConnectedBondsCount(mol.getAtom(0)));
    Assert.assertEquals(2, mol.getConnectedBondsCount(mol.getAtom(1)));
    Assert.assertEquals(2, mol.getConnectedBondsCount(mol.getAtom(2)));
}