@Test(expected = AuthenticationServiceException.class)
public void attemptAuthentication_test_with_wrong_port() {

    //Given
    mockHttpServletRequest.setMethod("GET");
    when(authenticationManager.authenticate(captor.capture())).thenReturn(null);
    //When
    target.attemptAuthentication(mockHttpServletRequest, mockHttpServletResponse);
}