@Override
  public void loginSuccess(HttpRequest request, @Nullable String login, Source source) {
    checkRequest(request);
    requireNonNull(source, "source can't be null");
    LOGGER.atDebug().setMessage("login success [method|{}][provider|{}|{}][IP|{}|{}][login|{}]")
      .addArgument(source::getMethod)
      .addArgument(source::getProvider)
      .addArgument(source::getProviderName)
      .addArgument(request::getRemoteAddr)
      .addArgument(() -> getAllIps(request))
      .addArgument(() -> preventLogFlood(sanitizeLog(emptyIfNull(login))))
      .log();
  }
@Test
  public void login_success_fails_with_NPE_if_source_is_null() {
    logTester.setLevel(Level.INFO);

    assertThatThrownBy(() -> underTest.loginSuccess(mock(HttpRequest.class), "login", null))
      .isInstanceOf(NullPointerException.class)
      .hasMessage("source can't be null");
  }