### Question:
PemUtils { public static String generateThumbprint(String[] certChain, String encoding) throws NoSuchAlgorithmException { return Base64Url.encode(generateThumbprintBytes(certChain, encoding)); } private  PemUtils(); static X509Certificate decodeCertificate(String cert); static PublicKey decodePublicKey(String pem); static PrivateKey decodePrivateKey(String pem); static String encodeKey(Key key); static String encodeCertificate(Certificate certificate); static byte[] pemToDer(String pem); static String removeBeginEnd(String pem); static String generateThumbprint(String[] certChain, String encoding);  }### Answer:
@Test public void testGenerateThumbprintSha1() throws NoSuchAlgorithmException { String[] test = new String[] {"abcdefg"}; String encoded = PemUtils.generateThumbprint(test, "SHA-1"); assertEquals(27, encoded.length()); }
@Test public void testGenerateThumbprintSha256() throws NoSuchAlgorithmException { String[] test = new String[] {"abcdefg"}; String encoded = PemUtils.generateThumbprint(test, "SHA-256"); assertEquals(43, encoded.length()); }