### Question:
JCECrypto implements Crypto { @Override public byte[] sha512(byte[] input) throws NoSuchAlgorithmException { return getDigest(input, "SHA-512"); } JCECrypto(Provider provider); @Override byte[] encryptRSA(byte[] message, PublicKey publicKey); @Override byte[] decryptRSA(byte[] message, PrivateKey privateKey); @Override RSAPublicKey getRSAPublicKeyFromPEM(String publicKey); @Override byte[] sha256(byte[] input); @Override byte[] sha384(byte[] input); @Override byte[] sha512(byte[] input); @Override String getRsaPublicKeyFingerprint(RSAPublicKey key); @Override String getRsaPublicKeyFingerprint(RSAPrivateKey key); static RSAPrivateKey getRSAPrivateKeyFromPEM(Provider provider, String pem); static RSAPublicKey getRSAPublicKeyFromPEM(Provider provider, String pem); static String getRsaPublicKeyFingerprint(Provider provider, RSAPrivateKey key); static String getRsaPublicKeyFingerprint(Provider provider, RSAPublicKey key); static String getPEMFromRSAPublicKey(RSAPublicKey publicKey); static String getPEMFromRSAPrivateKey(RSAPrivateKey privateKey);  }### Answer:
@Test public void testSha512() throws Exception { String expected = "64f02697ccd1c0ae741d9e226f957127da7a614d6a18f55f9f2726d2027faac1" + "e95e619dac5417eb4898fd6a9fb8aeb9cdd005e913c80e57454cae4b6fc6e5d6"; String actual = Hex.toHexString(crypto.sha512("Testing".getBytes())); assertEquals(expected, actual); }