@Test
public void testIdTokenSignedToken() {

    long now = System.currentTimeMillis() / 1000;
    IdToken token = createIdToken(now);
    // now get the signed token
    PrivateKey privateKey = Crypto.loadPrivateKey(ecPrivateKey);
    String idJws = token.getSignedToken(privateKey, "eckey1", SignatureAlgorithm.ES256);
    assertNotNull(idJws);
    // now verify our signed token
    JwtsSigningKeyResolver resolver = new JwtsSigningKeyResolver(null, null);
    resolver.addPublicKey("eckey1", Crypto.loadPublicKey(ecPublicKey));
    IdToken checkToken = new IdToken(idJws, resolver);
    validateIdToken(checkToken, now);
}