### Question:
SamlSettings { String getUserLogin() { return configuration.get(USER_LOGIN_ATTRIBUTE).orElseThrow(() -> new IllegalArgumentException("User login attribute is missing")); } SamlSettings(Configuration configuration);   }### Answer:
@Test public void return_user_login_attribute() { settings.setProperty("sonar.auth.saml.user.login", "userLogin"); assertThat(underTest.getUserLogin()).isEqualTo("userLogin"); }
@Test public void fail_to_get_user_login_attribute_when_null() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("User login attribute is missing"); underTest.getUserLogin(); }