public MessagesRequestSpec simpleQueryParamsToFullRequestSpecification(final String query,
                                                                           final Set<String> streams,
                                                                           final String timerangeKeyword,
                                                                           final List<String> fields,
                                                                           final String sort,
                                                                           final SortSpec.Direction sortOrder,
                                                                           final int from,
                                                                           final int size) {

        return new MessagesRequestSpec(query,
                streams,
                timerangeParser.parseTimeRange(timerangeKeyword),
                sort,
                sortOrder,
                from,
                size,
                fields);
    }
@Test
    void throwsExceptionOnEmptyGroups() {
        assertThrows(IllegalArgumentException.class, () -> toTest.simpleQueryParamsToFullRequestSpecification("*",
                Set.of(),
                "42d",
                List.of(),
                List.of("avg:joe")));
    }