### Question:
CipherDecrypto implements Decrypto { @Override @NonNull public byte[] decrypt(@NonNull final byte[] data) throws CryptographyException { try { return mCipher.doFinal(data); } catch (IllegalBlockSizeException | BadPaddingException e) { throw new CryptographyException("Decryption failed.", e); } } @SuppressWarnings("WeakerAccess")  CipherDecrypto(final Builder builder); @Override @NonNull byte[] decrypt(@NonNull final byte[] data);  }### Answer:
@Test public void testDecrypt() throws Exception { final KeyGenerator keyGenerator = KeyGenerator.getInstance("AES"); keyGenerator.init(128); final Key key = keyGenerator.generateKey(); final Encrypto encrypto = new CipherEncrypto.Builder() .cipher(new CipherBuilder() .transformation(CipherCryptography.createTransformation( CipherCryptography.Algorithm.AES, CipherCryptography.Mode.ECB, CipherCryptography.Padding.PKCS7 )) .opMode(Cipher.ENCRYPT_MODE) .key(key) .build() ) .build(); final Decrypto decrypto = new CipherDecrypto.Builder() .cipher(new CipherBuilder() .transformation(CipherCryptography.createTransformation( CipherCryptography.Algorithm.AES, CipherCryptography.Mode.ECB, CipherCryptography.Padding.PKCS7 )) .opMode(Cipher.DECRYPT_MODE) .key(key) .build() ) .build(); final byte[] encryptedData = encrypto.encrypt("Android".getBytes(Cryptography.CHARSET_NAME)); assertThat(decrypto.decrypt(encryptedData), is("Android".getBytes(Cryptography.CHARSET_NAME))); }