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

        checkMissingRequirements(search);
    }
@Test
    public void failsForMissingCapabilities() {
        final Search search = searchWithCapabilityRequirements("awesomeness");

        assertThatExceptionOfType(MissingCapabilitiesException.class)
                .isThrownBy(() -> sut.check(search, id -> true))
                .satisfies(ex -> assertThat(ex.getMissingRequirements()).containsOnlyKeys("awesomeness"));
    }