@Override
  public void doFilter(HttpRequest request, HttpResponse response, FilterChain chain) {
    IdentityProvider provider = resolveProviderOrHandleResponse(request, response, INIT_CONTEXT);
    if (provider != null) {
      handleProvider(request, response, provider);
    }
  }
@Test
  public void do_filter_on_basic_identity_provider() {
    when(request.getRequestURI()).thenReturn("/sessions/init/" + BASIC_PROVIDER_KEY);
    identityProviderRepository.addIdentityProvider(baseIdentityProvider);

    underTest.doFilter(request, response, chain);

    assertBasicInitCalled();
    verifyNoInteractions(authenticationEvent);
  }