public void check(Search search, Predicate<String> hasReadPermissionForStream) {
        checkUserIsPermittedToSeeStreams(search.streamIdsForPermissionsCheck(), hasReadPermissionForStream);

        checkMissingRequirements(search);
    }
@Test
    public void failsForNonPermittedStreams() {
        final Search search = searchWithStreamIds(RelativeRange.create(300), "ok", "not-ok");

        assertThatExceptionOfType(MissingStreamPermissionException.class)
                .isThrownBy(() -> sut.check(search, id -> id.equals("ok")))
                .satisfies(ex -> assertThat(ex.streamsWithMissingPermissions()).contains("not-ok"));
    }