### Question:
SamlSettings { Optional<String> getUserEmail() { return configuration.get(USER_EMAIL_ATTRIBUTE); } SamlSettings(Configuration configuration);   }### Answer:
@Test public void return_user_email_attribute() { settings.setProperty("sonar.auth.saml.user.email", "userEmail"); assertThat(underTest.getUserEmail().get()).isEqualTo("userEmail"); }
@Test public void return_empty_user_email_when_no_setting() { assertThat(underTest.getUserEmail()).isNotPresent(); }