### Question:
SamlSettings { String getProviderId() { return configuration.get(PROVIDER_ID).orElseThrow(() -> new IllegalArgumentException("Provider ID is missing")); } SamlSettings(Configuration configuration);   }### Answer:
@Test public void fail_to_get_provider_id_when_null() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("Provider ID is missing"); underTest.getProviderId(); }