CertificateFactory fact = CertificateFactory.getInstance("X.509");
for (int i = 0; i < CERTIFICATE_URLS.length; i++) {
URL certUrl = new URL(BASE_URL + CERTIFICATE_URLS[i]);
try {
InputStream is = certUrl.openStream();
Collection certs = fact.generateCertificates(is);
assertNotNull("The certificates in \""
+ certUrl.toExternalForm()
+ "\" were not parsed correctly", certs);
} catch (IOException e) {
// the certificate could not be found, skip it