### Question:
EncryptionServiceImpl implements EncryptionService { @Override public String decrypt(String crypted) { return crypted != null ? key.decrypt(crypted) : null; } EncryptionServiceImpl(ConfidentialKey key); @Autowired  EncryptionServiceImpl(ConfidentialStore confidentialStore); @Override String encrypt(String plain); @Override String decrypt(String crypted); @Override String exportKey(); @Override void importKey(String payload);  }### Answer:
@Test public void decrypt() throws Exception { service.decrypt("xxxx"); verify(key, times(1)).decrypt("xxxx"); }
@Test public void decrypt_null() throws Exception { service.decrypt(null); verify(key, never()).decrypt(anyString()); }