@Test
public void validate_wrongAlgorithm_shouldThrow() throws Exception {

  String algo = "HS256";
  JwtValidator validator = new JwtValidator.Builder().build();
  ToBeSignedJwt unverified = new ToBeSignedJwt.Builder().setAlgorithm(algo).build();
  assertThrows(
      InvalidAlgorithmParameterException.class, () -> validator.validate("blah", unverified));
}