### Question:
CertificateUtils { public static String getThumbPrint(Certificate certificate) throws NoSuchAlgorithmException, CertificateEncodingException { MessageDigest digestValue = MessageDigest.getInstance("SHA-1"); byte[] der = certificate.getEncoded(); digestValue.update(der); byte[] digestInBytes = digestValue.digest(); String publicCertThumbprint = hexify(digestInBytes); return new String((new Base64(0, (byte[]) null, true)). encode(publicCertThumbprint.getBytes(Charset.forName("UTF-8"))), Charset.forName("UTF-8")); }  static String getThumbPrint(Certificate certificate); static String hexify(byte[] bytes); static KeyResolver getKeyResolver();  }### Answer:
@Test public void testGetThumbPrint() throws Exception { KeyResolver keyResolver = CertificateUtils.getKeyResolver(); String thumbPrint = CertificateUtils.getThumbPrint(keyResolver.getCertificate()); Assert.assertEquals(thumbPrint, "OTFkOTUzMGIzYTc3YjFkMmRiNmJmOTA0NTk0OGRiNjVhODBkNDllNQ"); }