reqGen.setReqPolicy("4.4");
reqGen.setReqPolicy("1.4");
    private void badPolicyTest(        PrivateKey      privateKey,        X509Certificate cert,        CertStore       certs)        throws Exception    {        TimeStampTokenGenerator tsTokenGen = new TimeStampTokenGenerator(                privateKey, cert, TSPAlgorithms.SHA1, "1.2");                tsTokenGen.setCertificatesAndCRLs(certs);        TimeStampRequestGenerator reqGen = new TimeStampRequestGenerator();                reqGen.setReqPolicy("4.4");                TimeStampRequest            request = reqGen.generate(TSPAlgorithms.SHA1, new byte[20]);        TimeStampResponseGenerator tsRespGen = new TimeStampResponseGenerator(tsTokenGen, TSPAlgorithms.ALLOWED, new HashSet());        TimeStampResponse tsResp = tsRespGen.generate(request, new BigInteger("23"), new Date(), "BC");        tsResp = new TimeStampResponse(tsResp.getEncoded());        TimeStampToken  tsToken = tsResp.getTimeStampToken();        if (tsToken != null)        {            fail("badPolicy - token not null.");        }        PKIFailureInfo  failInfo = tsResp.getFailInfo();                if (failInfo == null)        {            fail("badPolicy - failInfo set to null.");        }                if (failInfo.intValue() != PKIFailureInfo.UNACCEPTED_POLICY)        {            fail("badPolicy - wrong failure info returned.");        }    }