@Test
public void testShouldFailIfProtocolSetToAnInt() throws Exception {

  PaymentMethodTokenRecipient recipient =
      new PaymentMethodTokenRecipient.Builder()
          .senderVerifyingKeys(GOOGLE_VERIFYING_PUBLIC_KEYS_JSON)
          .recipientId(RECIPIENT_ID)
          .addRecipientPrivateKey(MERCHANT_PRIVATE_KEY_PKCS8_BASE64)
          .build();
  JSONObject payload = new JSONObject(CIPHERTEXT_EC_V1);
  payload.put(PaymentMethodTokenConstants.JSON_PROTOCOL_VERSION_KEY, 1);
  try {
    recipient.unseal(payload.toString());
    fail("Expected GeneralSecurityException");
  } catch (GeneralSecurityException e) {
    // expected
  }
}