@Test
public void isMatchingCanary_WhenDecryptThrowsExceptionWithNoCause_throwsRuntimeException() throws Exception {

  subject = new LunaKeyProxy(encryptionKey,
    new PasswordEncryptionService(new TestPasswordKeyProxyFactory()) {
      @Override
      public String decrypt(final Key key, final byte[] encryptedValue, final byte[] nonce) {
        throw new RuntimeException("test message");
      }
    });
  try {
    subject.matchesCanary(mock(EncryptionKeyCanary.class));
    fail("Expected to get RuntimeException");
  } catch (RuntimeException e) {
    assertThat(e.getCause().getMessage(), equalTo("test message"));
  }
}