private void subscribeAndAssign(TopicIdPartition tp) {
        subscriptions.subscribe(Collections.singleton(tp.topic()), Optional.empty());
        subscriptions.assignFromSubscribed(Collections.singleton(tp.topicPartition()));
    }
This tests the {@link ShareFetchCollector} functionality.
clients/src/test/java/org/apache/kafka/clients/consumer/internals/ShareFetchCollectorTest.java