@Test
public void testFromBlog2() throws Exception {

    SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
    IAtomContainer mol = sp.parseSmiles("[C@@H](Cl)1[C@H](C)(F).Br1");
    Iterator<IStereoElement> stereoElements = mol.stereoElements().iterator();
    for (int i = 0; i < 2; i++) {
        assertTrue(stereoElements.hasNext());
        IStereoElement stereoElement = stereoElements.next();
        Assert.assertNotNull(stereoElement);
        assertTrue(stereoElement instanceof ITetrahedralChirality);
        ITetrahedralChirality l4Chiral = (ITetrahedralChirality) stereoElement;
        Assert.assertEquals("C", l4Chiral.getChiralAtom().getSymbol());
        if (l4Chiral.getChiralAtom().equals(mol.getAtom(0))) {
            IAtom[] ligands = l4Chiral.getLigands();
            for (IAtom atom : ligands)
                Assert.assertNotNull(atom);
            // note: ligands are given in the order they appear, there is
            // one inversion (0,1,5,2) -> (0,1,2,5) so winding flips
            Assert.assertEquals(mol.getAtom(0), ligands[0]);
            Assert.assertEquals(mol.getAtom(1), ligands[1]);
            Assert.assertEquals(mol.getAtom(2), ligands[2]);
            Assert.assertEquals(mol.getAtom(5), ligands[3]);
            Assert.assertEquals(Stereo.ANTI_CLOCKWISE, l4Chiral.getStereo());
        } else {
            IAtom[] ligands = l4Chiral.getLigands();
            for (IAtom atom : ligands)
                Assert.assertNotNull(atom);
            Assert.assertEquals(mol.getAtom(0), ligands[0]);
            Assert.assertEquals(mol.getAtom(2), ligands[1]);
            Assert.assertEquals(mol.getAtom(3), ligands[2]);
            Assert.assertEquals(mol.getAtom(4), ligands[3]);
            Assert.assertEquals(Stereo.ANTI_CLOCKWISE, l4Chiral.getStereo());
        }
    }
}