use of com.auth0.jwt.UserPojo in project java-jwt by auth0.
the class JsonNodeClaimTest method shouldGetCustomClassValue.
@Test
public void shouldGetCustomClassValue() {
JsonNode value = mapper.valueToTree(new UserPojo("john", 123));
Claim claim = claimFromNode(value);
assertThat(claim, is(notNullValue()));
assertThat(claim.as(UserPojo.class).getName(), is("john"));
assertThat(claim.as(UserPojo.class).getId(), is(123));
}