@Test
public void testFindHeavyAtomsInChain_IAtomContainer_IAtomContainer() throws Exception {

    String filename = "data/mdl/allmol232.mol";
    InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
    // TODO: shk3-cleanuptests: best to use the STRICT IO mode here
    MDLV2000Reader reader = new MDLV2000Reader(ins);
    ChemFile chemFile = (ChemFile) reader.read((ChemObject) new ChemFile());
    reader.close();
    List<IAtomContainer> containersList = ChemFileManipulator.getAllAtomContainers(chemFile);
    IAtomContainer ac = new AtomContainer(containersList.get(0));
    addExplicitHydrogens(ac);
    IAtomContainer chain = ac.getBuilder().newInstance(IAtomContainer.class);
    for (int i = 16; i < 25; i++) {
        chain.addAtom(ac.getAtom(i));
    }
    chain.addAtom(ac.getAtom(29));
    chain.addAtom(ac.getAtom(30));
    int[] result = new AtomPlacer3D().findHeavyAtomsInChain(ac, chain);
    Assert.assertEquals(16, result[0]);
    Assert.assertEquals(11, result[1]);
}