public void initLogin(String callbackUrl, String relayState, HttpRequest request, HttpResponse response) {
    Auth auth = this.initSamlAuth(callbackUrl, request, response);
    login(auth, relayState);
  }
@Test
  public void givenMissingSpCertificate_whenInitializingTheAuthentication_thenExceptionIsThrown() {
    initBasicSamlSettings();

    settings.setProperty("sonar.auth.saml.signature.enabled", true);
    settings.setProperty("sonar.auth.saml.sp.privateKey.secured", "PRIVATE_KEY");

    assertThatIllegalStateException()
      .isThrownBy(() -> underTest.initLogin("","", mock(JavaxHttpRequest.class), mock(JavaxHttpResponse.class)))
      .withMessage("Failed to create a SAML Auth")
      .havingCause()
      .withMessage("Service provider certificate is missing");
  }