@Test
    public void commitDoesNotThrowOnUnsupportedExtensionsCallback() throws LoginException {
        Subject subject = new Subject();

        // Create callback handler
        OAuthBearerToken[] tokens = new OAuthBearerToken[] {mock(OAuthBearerToken.class),
                mock(OAuthBearerToken.class), mock(OAuthBearerToken.class)};
        TestCallbackHandler testTokenCallbackHandler = new TestCallbackHandler(tokens, new SaslExtensions[] {RAISE_UNSUPPORTED_CB_EXCEPTION_FLAG});

        // Create login modules
        OAuthBearerLoginModule loginModule1 = new OAuthBearerLoginModule();
        loginModule1.initialize(subject, testTokenCallbackHandler, Collections.emptyMap(),
                Collections.emptyMap());

        loginModule1.login();
        // Should populate public credentials with SaslExtensions and not throw an exception
        loginModule1.commit();
        SaslExtensions extensions = subject.getPublicCredentials(SaslExtensions.class).iterator().next();
        assertNotNull(extensions);
        assertTrue(extensions.map().isEmpty());

        verifyNoInteractions((Object[]) tokens);
    }
2.1.0 added customizable SASL extensions and a new callback type.
Ensure that old, custom-written callbackHandlers that do not handle the callback work
clients/src/test/java/org/apache/kafka/common/security/oauthbearer/OAuthBearerLoginModuleTest.java