@Test
public void testDefaultOAuthJwtAccessToken() {

    BiFunction<Field, DefaultOAuthJwtAccessToken, Object> getFieldValue = (f, object) -> {
        JwtBuilder b = Jwts.builder().setSubject("Bob");
        try {
            f.setAccessible(true);
            return f.get(object);
        } catch (IllegalArgumentException | IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    };
    Jws<Claims> jws = this.parser.parseClaimsJws(jwtString);
    DefaultOAuthJwtAccessToken at = new DefaultOAuthJwtAccessToken(jws);
    assertNotNull(at);
    for (Field f : at.getClass().getDeclaredFields()) {
        switch (f.getName()) {
        case "body":
            assertSame(getFieldValue.apply(f, at), jws.getBody());
            break;
        case "signature":
            assertSame(getFieldValue.apply(f, at), jws.getSignature());
            break;
        }
    }
}