@Test
public void testPDBFileCoffein() throws Exception {

    String filename = "data/pdb/coffeine.pdb";
    InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
    ISimpleChemObjectReader oReader = new PDBReader(ins);
    Assert.assertNotNull(oReader);
    IChemFile oChemFile = (IChemFile) oReader.read(new ChemFile());
    Assert.assertNotNull(oChemFile);
    Assert.assertEquals(oChemFile.getChemSequenceCount(), 1);
    IChemSequence oSeq = oChemFile.getChemSequence(0);
    Assert.assertNotNull(oSeq);
    Assert.assertEquals(oSeq.getChemModelCount(), 1);
    IChemModel oModel = oSeq.getChemModel(0);
    Assert.assertNotNull(oModel);
    Assert.assertEquals(1, oModel.getMoleculeSet().getAtomContainerCount());
    IAtomContainer container = oModel.getMoleculeSet().getAtomContainer(0);
    Assert.assertFalse(container instanceof IBioPolymer);
    Assert.assertTrue(container instanceof IAtomContainer);
    IAtomContainer oMol = (IAtomContainer) container;
    Assert.assertNotNull(oMol);
    Assert.assertEquals(oMol.getAtomCount(), 14);
    IAtom nAtom = oMol.getAtom(0);
    Assert.assertNotNull(nAtom);
    Assert.assertTrue(nAtom instanceof IPDBAtom);
    IPDBAtom oAtom = (IPDBAtom) nAtom;
    Assert.assertEquals(new String("C"), oAtom.getSymbol());
    Assert.assertEquals(1, oAtom.getSerial().intValue());
    Assert.assertEquals("C1", oAtom.getName());
    Assert.assertEquals("MOL", oAtom.getResName());
    Assert.assertEquals("1", oAtom.getResSeq());
    Assert.assertEquals(1.0, oAtom.getOccupancy(), 0);
    Assert.assertEquals(0.0, oAtom.getTempFactor(), 0);
    nAtom = oMol.getAtom(3);
    Assert.assertNotNull(nAtom);
    Assert.assertTrue(nAtom instanceof IPDBAtom);
    oAtom = (IPDBAtom) nAtom;
    Assert.assertEquals("O", oAtom.getSymbol());
    Assert.assertEquals(4, oAtom.getSerial().intValue());
    Assert.assertEquals("O4", oAtom.getName());
    Assert.assertEquals("MOL", oAtom.getResName());
    Assert.assertEquals("1", oAtom.getResSeq());
    Assert.assertEquals(1.0, oAtom.getOccupancy(), 0);
    Assert.assertEquals(0.0, oAtom.getTempFactor(), 0);
    nAtom = oMol.getAtom(oMol.getAtomCount()-1);
    Assert.assertNotNull(nAtom);
    Assert.assertTrue(nAtom instanceof IPDBAtom);
    oAtom = (IPDBAtom) nAtom;
    Assert.assertEquals("N", oAtom.getSymbol());
    Assert.assertEquals(14, oAtom.getSerial().intValue());
    Assert.assertEquals("N14", oAtom.getName());
    Assert.assertEquals("MOL", oAtom.getResName());
    Assert.assertEquals("1", oAtom.getResSeq());
    Assert.assertEquals(1.0, oAtom.getOccupancy(), 0);
    Assert.assertEquals(0.0, oAtom.getTempFactor(), 0);
}