@Test
public void testShouldAcceptNonExpiredECV2Message() throws Exception {

  PaymentMethodTokenRecipient recipient =
      new PaymentMethodTokenRecipient.Builder()
          .protocolVersion(PaymentMethodTokenConstants.PROTOCOL_VERSION_EC_V2)
          .senderVerifyingKeys(GOOGLE_VERIFYING_PUBLIC_KEYS_JSON)
          .recipientId(RECIPIENT_ID)
          .addRecipientPrivateKey(MERCHANT_PRIVATE_KEY_PKCS8_BASE64)
          .build();
  String plaintext =
      new JSONObject()
          .put(
              "messageExpiration",
              // One day in the future
              String.valueOf(Instant.now().plus(Duration.standardDays(1)).getMillis()))
          .toString();
  assertEquals(plaintext, recipient.unseal(sealECV2(plaintext)));
}