@Test
  public void testCanValidateBadToken() {
    parameters.setToken(receivedBadToken);
    TokenValidatorResponse response = validator.validateToken(parameters);

    assertEquals(ReceivedToken.STATE.INVALID, response.getToken().getState());
  }
  @Test
  public void testCanValidateBadIpToken() {
    TokenValidatorParameters params = new TokenValidatorParameters();
    params.setToken(receivedTokenBadIp);
    TokenValidatorResponse response = validator.validateToken(params);

    assertEquals(ReceivedToken.STATE.INVALID, response.getToken().getState());
  }
  @Test
  public void testCanValidateToken() {
    TokenValidatorResponse response = validator.validateToken(parameters);

    assertEquals(ReceivedToken.STATE.VALID, response.getToken().getState());

    assertThat(response.getToken().getPrincipal(), instanceOf(GuestPrincipal.class));
  }