@Test
public void testWrite() throws Exception {

    StringWriter strWriter = new StringWriter();
    Mopac7Writer writer = new Mopac7Writer(strWriter);
    IAtomContainer mol = new AtomContainer();
    mol.addAtom(new Atom("Cr"));
    writer.write(mol);
    writer.close();
    Assert.assertTrue(strWriter.toString().contains("PM3"));
    Assert.assertTrue(strWriter.toString().contains("Cr "));
    Assert.assertTrue(strWriter.toString().contains("Generated by"));
}