### Question:
CipherEncryptionServiceImpl implements CipherEncryptionService { @Override public String decrypt( String encryptedPassword ) throws PasswordServiceException { try { Cipher decCipher = Cipher.getInstance( secretKey.getAlgorithm() ); decCipher.init( Cipher.DECRYPT_MODE, secretKey, paramSpec ); byte[] toDecryptBytes = Base64.decodeBase64( encryptedPassword.getBytes() ); byte[] decryptedBytes = decCipher.doFinal( toDecryptBytes ); return new String( decryptedBytes, UTF_8 ); } catch ( Exception ex ) { throw new PasswordServiceException( ex ); } } CipherEncryptionServiceImpl( String saltString, String algorithm, String encryptionKey, int iterations ); @Override String decrypt( String encryptedPassword ); @Override String encrypt( String clearPassword );  }### Answer:
@Test public void testCipherDecryptionWithDefaults() throws Exception { CipherEncryptionServiceImpl service = new CipherEncryptionServiceImpl( "_CyPh3r_", "PBEWithMD5AndDES", "P3ntah0C1ph3r", 19 ); String encryptedString = "R1pxG/vXQU8ezFM5VE644dqQxCKNP+Ap"; String decryptedStringExpected = "String To Encrypt"; String decryptedStringActual = service.decrypt( encryptedString ); Assert.assertEquals( decryptedStringExpected, decryptedStringActual ); }