private void awaitConsumerGroupInactive(ConsumerGroupCommand.ConsumerGroupService service,
                                            String group) throws Exception {
        TestUtils.waitForCondition(() -> {
            ConsumerGroupState state = service.collectGroupState(group).state;
            return Objects.equals(state, ConsumerGroupState.EMPTY) || Objects.equals(state, ConsumerGroupState.DEAD);
        }, "Expected that consumer group is inactive. Actual state: " +
                service.collectGroupState(group).state);
    }
Test cases by:
- Non-existing consumer group
- One for each scenario, with scope=all-topics
- scope=one topic, scenario=to-earliest
- scope=one topic+partitions, scenario=to-earliest
- scope=topics, scenario=to-earliest
- scope=topics+partitions, scenario=to-earliest
- export/import
tools/src/test/java/org/apache/kafka/tools/consumer/group/ResetConsumerGroupOffsetTest.java