public static boolean isEmptyConsumerGroup(final Admin adminClient,
                                               final String applicationId) {
        try {
            final ConsumerGroupDescription groupDescription =
                    adminClient.describeConsumerGroups(singletonList(applicationId))
                            .describedGroups()
                            .get(applicationId)
                            .get();
            return groupDescription.members().isEmpty();
        } catch (final ExecutionException | InterruptedException e) {
            return false;
        }
    }
Waits for the given {@link KafkaStreams} instances to all be in a specific {@link State}.
Prefer {@link #startApplicationAndWaitUntilRunning(List, Duration)} when possible
because this method uses polling, which can be more error prone and slightly slower.

@param streamsList the list of streams instances to run.
@param state the expected state that all the streams to be in within timeout
@param timeout the time to wait for the streams to all be in the specific state.

@throws InterruptedException if the streams doesn't change to the expected state in time.
streams/src/test/java/org/apache/kafka/streams/integration/utils/IntegrationTestUtils.java