@Test
public void validate_type_success() throws Exception {

  ToBeSignedJwt unverified =
      new ToBeSignedJwt.Builder().setAlgorithm("HS256").setType("JWT").build();
  JwtValidator validator = new JwtValidator.Builder().setType("JWT").build();
  Jwt token = validator.validate("HS256", unverified);
  assertThat(token.getType()).isEqualTo("JWT");
}