@Test
public void validate_algorithm_success() throws Exception {

  String algo = "HS256";
  JwtValidator validator = new JwtValidator.Builder().build();
  ToBeSignedJwt unverified = new ToBeSignedJwt.Builder().setAlgorithm(algo).build();
  Jwt token = validator.validate(algo, unverified);
  assertThat(token.getAlgorithm()).isEqualTo(algo);
}