@Test
public void testInexistentKeytabPath() throws Exception {

    List<Map<String, String>> config = List.of(Map.of(
        "keytab", "/home/does-not-exist",
        "principal", "blah"
    ));
    try (SettingsOverride override = SettingsOverride.apply(Map.of(AppSettings.KEYTABS, config))) {
        try {
            SpnegoAuthenticator auth = new SpnegoAuthenticator();
            auth.authenticateUser();
            fail();
        } catch (IllegalArgumentException e) {
            assertEquals("Keytab `/home/does-not-exist` in `authentication.spnego.keytabs` setting does not exist", e.getMessage());
        }
    }
}