assertEquals(RSAkid,service.getDefaultEncryptionKeyId());
assertEquals(RSAkid,service.getDefaultDecryptionKeyId());
JWEHeader header = new JWEHeader(JWEAlgorithm.RSA_OAEP, EncryptionMethod.A256GCM);
EncryptedJWT jwt = new EncryptedJWT(header, claimsSet);
service.encryptJwt(jwt);
String serialized = jwt.serialize();
EncryptedJWT encryptedJwt = EncryptedJWT.parse(serialized);
assertThat(encryptedJwt.getJWTClaimsSet(), nullValue());
service.decryptJwt(encryptedJwt);
ReadOnlyJWTClaimsSet resultClaims = encryptedJwt.getJWTClaimsSet();
assertEquals(claimsSet.getIssuer(), resultClaims.getIssuer());
assertEquals(claimsSet.getSubject(), resultClaims.getSubject());
}