RespData respData = brep.getResponseData(); SingleResp[] singleResps = respData.getResponses();
SingleResp[] singleResps = brep.getResponses();
    public void test05OcspUnknown() throws Exception {        log.debug(">test05OcspUnknown()");        // An OCSP request for an unknown certificate (not exist in db)        OCSPReqGenerator gen = new OCSPReqGenerator();        gen.addRequest(new CertificateID(CertificateID.HASH_SHA1, cacert, new BigInteger("1")));        OCSPReq req = gen.generate();        // POST the OCSP request        WebConversation wc1 = new WebConversation();        ByteArrayInputStream bais = new ByteArrayInputStream(req.getEncoded());        PostMethodWebRequest request = new PostMethodWebRequest(httpReqPath + '/' + resourceOcsp, bais, "application/ocsp-request");        WebResponse webresponse = wc1.getResponse(request);        assertEquals("Response code", 200, webresponse.getResponseCode());        assertEquals("Content-Type", "application/ocsp-response", webresponse.getContentType());        // Extract the response        InputStreamReader in = new InputStreamReader(webresponse.getInputStream());        ByteArrayOutputStream baos = new ByteArrayOutputStream();        // This works for small requests, and OCSP requests are small        int b = in.read();        while (b != -1) {            baos.write(b);            b = in.read();        }        baos.flush();        in.close();        byte[] respBytes = baos.toByteArray();        OCSPResp response = new OCSPResp(new ByteArrayInputStream(respBytes));        assertEquals("Response status not zero.", response.getStatus(), 0);        BasicOCSPResp brep = (BasicOCSPResp) response.getResponseObject();        X509Certificate[] chain = brep.getCerts("BC");        boolean verify = brep.verify(chain[0].getPublicKey(), "BC");        assertTrue("Response failed to verify.", verify);        RespData respData = brep.getResponseData();        SingleResp[] singleResps = respData.getResponses();        assertEquals("No of SingResps should be 1.", singleResps.length, 1);        SingleResp singleResp = singleResps[0];        CertificateID certId = singleResp.getCertID();        assertEquals("Serno in response does not match serno in request.", certId.getSerialNumber(), new BigInteger("1"));        Object status = singleResp.getCertStatus();        assertTrue("Status is not Unknown", status instanceof UnknownStatus);        log.debug("<test05OcspUnknown()");    }