// Verify that the response is of the right type
assertTrue(pkcs7Response.getResponseType().equals(CertificateHelper.RESPONSETYPE_PKCS7));
// Verify that the PKCS#7 response contains a certificate
CMSSignedData cmsSignedData = new CMSSignedData(CertificateHelper.getPKCS7(pkcs7Response.getData()));
assertNotNull(cmsSignedData);
CertStore certStore = cmsSignedData.getCertificatesAndCRLs("Collection", "BC");
assertTrue(certStore.getCertificates(null).size() == 1);
return null;
}