public static AccessTokenValidator create(Map<String, ?> configs) {
        return create(configs, (String) null);
    }
@Test
    public void testConfigureThrowsExceptionOnAccessTokenValidatorInit() {
        OAuthBearerLoginCallbackHandler handler = new OAuthBearerLoginCallbackHandler();
        AccessTokenRetriever accessTokenRetriever = new AccessTokenRetriever() {
            @Override
            public void init() throws IOException {
                throw new IOException("My init had an error!");
            }
            @Override
            public String retrieve() {
                return "dummy";
            }
        };

        Map<String, ?> configs = getSaslConfigs();
        AccessTokenValidator accessTokenValidator = AccessTokenValidatorFactory.create(configs);

        assertThrowsWithMessage(
            KafkaException.class, () -> handler.init(accessTokenRetriever, accessTokenValidator), "encountered an error when initializing");
    }