@ClusterTemplate("generator")
    public void testResetOffsetsByDurationFallbackToLatestWhenNoRecords(ClusterInstance cluster) throws ExecutionException, InterruptedException {
        String group = generateRandomGroupId();
        String topic = generateRandomTopic();

        String[] args = buildArgsForGroup(cluster, group, "--topic", topic, "--by-duration", "PT1M", "--execute");

        try (Admin admin = cluster.createAdminClient()) {
            admin.createTopics(singleton(new NewTopic(topic, 1, (short) 1))).all().get();
            resetAndAssertOffsets(cluster, args, 0, false, singletonList(topic));
            admin.deleteTopics(singleton(topic)).all().get();
        }
    }
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