@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 fail_if_uri_does_not_contains_callback() throws Exception {
    when(request.getRequestURI()).thenReturn("/sessions/init");

    underTest.doFilter(request, response, chain);

    assertError("No provider key found in URI");
    verifyNoInteractions(authenticationEvent);
    verifyNoInteractions(auth2AuthenticationParameters);
  }