for (int i=0; i<2; i++) {
certList.add(certificate);
}
X509CertFactoryImpl certFactory = new X509CertFactoryImpl();
certFactory.engineGenerateCertPath(certList);
certList.add(new Integer(5));
try {
certFactory.engineGenerateCertPath(certList);
fail("Expected CertificateException was not thrown.");