@Test
public void testMissingValue() throws Exception {

    List<List<Map<String, String>>> configs = List.of(
        List.of(Map.of("keytab", "bar")),    // Missing principal
        List.of(Map.of("principal", "bar"))  // Missing keytab
    );
    for (List<Map<String, String>> config: configs) {
        try (SettingsOverride override = SettingsOverride.apply(Map.of(AppSettings.KEYTABS, config))) {
            try {
                SpnegoAuthenticator auth = new SpnegoAuthenticator();
                auth.authenticateUser();
                fail();
            } catch (IllegalArgumentException e) {
                assertTrue(e.getMessage().startsWith("Invalid `authentication.spnego.keytabs` setting -- Error: hardcoded value: No configuration setting found for key"));
            }
        }
    }
}