@Test
    public void testInflightFetchResultNotProcessedForPartitionsAwaitingCallbackCompletion() {
        buildFetcher();

        assignFromUser(singleton(tp0));
        subscriptions.seek(tp0, 0);

        assertEquals(1, sendFetches());
        subscriptions.markPendingOnAssignedCallback(singleton(tp0), true);

        client.prepareResponse(fullFetchResponse(tidp0, records, Errors.NONE, 100L, 0));
        networkClientDelegate.poll(time.timer(0));
        assertNull(fetchRecords().get(tp0));
    }
This validates that in-flight fetch requests are not completed for partitions that are
waiting for the onPartitionsAssigned callback to complete. Note that this
markPendingOnAssignedCallback functionality is only used from the {@link AsyncKafkaConsumer}.
clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetchRequestManagerTest.java