VerificationOK { public String toString() { StringBuilder sb = new StringBuilder(); if (certificate != null) { sb.append(certificate.getSubjectDN().getName()); sb.append(" verified with "); } sb.append(verifierClass.getName()); sb.append(": "); sb.append(message); return sb.toString(); } VerificationOK(X509Certificate certificate,
                          Class<? extends CertificateVerifier> verifierClass, String message); String toString();  }
@Test public void toStringTest() { VerificationOK verificationOK = new VerificationOK(null, CRLVerifier.class, "Mock verification"); Assert.assertEquals(CRLVerifier.class.getName() + ": Mock verification", verificationOK.toString()); }