public boolean test(final IndexRange indexRange,
                        final Set<Stream> validStreams) {
        // If index range is incomplete, check the prefix against the valid index sets.
        if (indexRange.streamIds() == null) {
            return validStreams.stream()
                    .map(Stream::getIndexSet)
                    .anyMatch(indexSet -> indexSet.isManagedIndex(indexRange.indexName()));
        }

        final Set<String> validStreamIds = validStreams.stream()
                .map(Stream::getId)
                .collect(Collectors.toSet());
        // Otherwise check if the index range contains any of the valid stream ids.
        return !Collections.disjoint(indexRange.streamIds(), validStreamIds);
    }
@Test
    public void emptyStreamsShouldNotMatchAnything() {
        final IndexRange indexRange = mock(IndexRange.class);

        assertThat(toTest.test(indexRange, Collections.emptySet())).isFalse();
    }