@Test
  public void testDefaultEncryptDecrypt() throws InvalidProtocolBufferException {
    final String METHOD = "testDefaultEncryptDecrypt";
    final AesCipherService aes = new AesCipherService();
    final Map<String, Key> keys =
        ImmutableMap.<String, Key>builder().put("a", aes.generateNewKey()).build();
    final EncryptionService service = new EncryptionServiceImpl(aes, keys);
    byte[] encrypted = service.encrypt(appInstanceBytes, "a");
    log.logp(
        Level.INFO,
        getClass().getName(),
        METHOD,
        String.format("uncrypted length = %d", appInstanceBytes.length));
    log.logp(
        Level.INFO,
        getClass().getName(),
        METHOD,
        String.format("encrypted length = %d", encrypted.length));

    final byte[] decrypted = service.decrypt(encrypted, "a");
    log.logp(
        Level.INFO,
        getClass().getName(),
        METHOD,
        String.format("decrypted length = %d", appInstanceBytes.length));
    final RunRightFastApplicationInstance appInstance2 =
        RunRightFastApplicationInstance.parseFrom(decrypted);
    assertThat(appInstance2, is(equalTo(appInstance)));
  }