### Question:
SamlSettings { String getLoginUrl() { return configuration.get(LOGIN_URL).orElseThrow(() -> new IllegalArgumentException("Login URL is missing")); } SamlSettings(Configuration configuration);   }### Answer:
@Test public void return_login_url() { settings.setProperty("sonar.auth.saml.loginUrl", "http: assertThat(underTest.getLoginUrl()).isEqualTo("http: settings.setProperty("sonar.auth.saml.loginUrl", "http: assertThat(underTest.getLoginUrl()).isEqualTo("http: }
@Test public void fail_to_get_login_url_when_null() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("Login URL is missing"); underTest.getLoginUrl(); }