### Question:
CipherUtils { public static String encrypt(String plainText, String key) throws CipherException { try { Cipher cipher = Cipher.getInstance(CIPHER_INSTANCE); cipher.init(Cipher.ENCRYPT_MODE, stringToKey(key)); byte[] encrypted = Base64.getEncoder().encode(cipher.doFinal(plainText.getBytes(UTF_8))); return new String(encrypted, UTF_8); } catch (Exception e) { throw new CipherException("Cannot encrypt", e); } }  static String encrypt(String plainText, String key); static String decrypt(String cipherText, String key);  }### Answer:
@Test public void should_encrypt1() throws CipherException { assertThat(CipherUtils.encrypt(PLAIN_TEXT1, KEY1), is(CIPHER_TEXT1)); }
@Test public void should_encrypt2() throws CipherException { assertThat(CipherUtils.encrypt(PLAIN_TEXT2, KEY1), is(CIPHER_TEXT2)); }