public EntityShareResponse prepareShare(GRN ownedEntity,
                                            EntityShareRequest request,
                                            User sharingUser,
                                            Subject sharingSubject) {
        requireNonNull(ownedEntity, "ownedEntity cannot be null");
        requireNonNull(request, "request cannot be null");
        requireNonNull(sharingUser, "sharingUser cannot be null");
        requireNonNull(sharingSubject, "sharingSubject cannot be null");

        final GRN sharingUserGRN = grnRegistry.ofUser(sharingUser);
        final Set<Grantee> modifiableGrantees = getModifiableGrantees(sharingUser, sharingUserGRN, ownedEntity);
        final Set<GRN> modifiableGranteeGRNs = modifiableGrantees.stream().map(Grantee::grn).collect(Collectors.toSet());

        final ImmutableSet<ActiveShare> modifiableActiveShares = getActiveShares(ownedEntity, sharingUser, modifiableGranteeGRNs);

        return EntityShareResponse.builder()
                .entity(ownedEntity.toString())
                .sharingUser(sharingUserGRN)
                .availableGrantees(modifiableGrantees)
                .availableCapabilities(getAvailableCapabilities())
                .activeShares(modifiableActiveShares)
                .selectedGranteeCapabilities(getSelectedGranteeCapabilities(modifiableActiveShares, request))
                .missingPermissionsOnDependencies(checkMissingPermissionsOnDependencies(ownedEntity, sharingUserGRN, modifiableActiveShares, request))
                .validationResult(validateRequest(ownedEntity, request, sharingUser, modifiableGranteeGRNs))
                .build();
    }
@DisplayName("Only show shares for visible grantees")
    @Test
    void noSharesforInvisibleGrantees() {
        final GRN entity = grnRegistry.newGRN(GRNTypes.STREAM, "54e3deadbeefdeadbeefaffe");
        final EntityShareRequest shareRequest = EntityShareRequest.create(null);

        final User user = createMockUser("hans");
        final Subject subject = mock(Subject.class);
        final EntityShareResponse entityShareResponse = entitySharesService.prepareShare(entity, shareRequest, user, subject);
        assertThat(entityShareResponse.activeShares()).satisfies(activeShares -> {
            assertThat(activeShares).isEmpty();
        });

    }