@Test
public void testCPSA() throws Exception {

    String filename = "data/hin/benzene.hin";
    InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
    ISimpleChemObjectReader reader = new HINReader(ins);
    ChemFile content = (ChemFile) reader.read((ChemObject) new ChemFile());
    List cList = ChemFileManipulator.getAllAtomContainers(content);
    IAtomContainer ac = (IAtomContainer) cList.get(0);
    DoubleArrayResult retval = (DoubleArrayResult) descriptor.calculate(ac).getValue();
    /*
     * System.out.println("Num ret = "+retval.size()); for (int i = 0; i <
     * retval.size(); i++) { System.out.println( retval.get(i) ); }
     */
    Assert.assertEquals(0, retval.get(28), 0.0001); // RPSA
    Assert.assertEquals(1, retval.get(27), 0.0001); // RHSA
    Assert.assertEquals(0, retval.get(26), 0.0001); // TPSA
    Assert.assertEquals(231.66182, retval.get(25), 0.0001); // THSA
}