@Test
public void testAccessTokenSignedTokenPublicKey() {

    long now = System.currentTimeMillis() / 1000;
    AccessToken accessToken = createAccessToken(now);
    // now get the signed token
    PrivateKey privateKey = Crypto.loadPrivateKey(ecPrivateKey);
    String accessJws = accessToken.getSignedToken(privateKey, "eckey1", SignatureAlgorithm.ES256);
    assertNotNull(accessJws);
    // now verify our signed token
    AccessToken checkToken = new AccessToken(accessJws, Crypto.loadPublicKey(ecPublicKey));
    validateAccessToken(checkToken, now);
}