@Test(expected = IllegalArgumentException.class)
public void authenticate_with_invalid_authenticationToken() {

    Authentication token = new UsernamePasswordAuthenticationToken("username", "password");
    authenticationProvider.authenticate(token);
}