### Question:
EncryptionUtils { public static String decrypt (PrivateKey privateKey, byte [] encrypted) throws Exception { byte[] decrypted = decryptToBytes(privateKey, encrypted); return new String(decrypted, StandardCharsets.UTF_8); } protected  EncryptionUtils(); static void init(PublicKey pubKey); static boolean isInitialized(); static byte[] encrypt(PublicKey publicKey, String message); static byte[] encrypt(String message); static byte[] decryptToBytes(PrivateKey privateKey, byte [] encrypted); static String decrypt(PrivateKey privateKey, byte [] encrypted); static PublicKey getPubKeyFromArray(byte[] bytes); static byte[] convertPublicKeyToByteArray(PublicKey publicKey); static KeyPair generateKeyPair();  }### Answer:
@Test (expected = NullPointerException.class) public void testDecryptNullKey () throws Exception { EncryptionUtils.decrypt(null, new byte[2]); }
@Test (expected = NullPointerException.class) public void testDecryptNullArray () throws Exception { PrivateKey privateKey = generatePrivateKey(); EncryptionUtils.decrypt(privateKey, null); }
@Test (expected = IllegalArgumentException.class) public void testDecryptEmptyArray () throws Exception { PrivateKey privateKey = generatePrivateKey(); EncryptionUtils.decrypt(privateKey, new byte[0]); }