@Test
    public void testAuthorizationPriorToCompleteInitialLoad() throws Exception {
        StandardAuthorizer authorizer = new StandardAuthorizer();
        authorizer.configure(Collections.singletonMap(SUPER_USERS_CONFIG, "User:superman"));
        assertThrows(AuthorizerNotReadyException.class, () ->
            authorizer.authorize(new MockAuthorizableRequestContext.Builder().
                    setPrincipal(new KafkaPrincipal(USER_TYPE, "bob")).build(),
                Arrays.asList(newAction(READ, TOPIC, "green1"),
                    newAction(READ, TOPIC, "green2"))));
        assertEquals(Arrays.asList(ALLOWED, ALLOWED),
            authorizer.authorize(new MockAuthorizableRequestContext.Builder().
                    setPrincipal(new KafkaPrincipal(USER_TYPE, "superman")).build(),
                Arrays.asList(newAction(READ, TOPIC, "green1"),
                    newAction(WRITE, GROUP, "wheel"))));
    }
Test attempts to authorize prior to completeInitialLoad. During this time, only
superusers can be authorized. Other users will get an AuthorizerNotReadyException
exception. Not even an authorization result, just an exception thrown for the whole
batch.
metadata/src/test/java/org/apache/kafka/metadata/authorizer/StandardAuthorizerTest.java