public Map<GRN, Set<GRN>> getOwnersForTargets(Collection<GRN> targets) {
        return db.find(DBQuery.and(
                        DBQuery.in(GrantDTO.FIELD_TARGET, targets),
                        DBQuery.is(GrantDTO.FIELD_CAPABILITY, Capability.OWN)
                )).toArray()
                .stream()
                .collect(Collectors.groupingBy(
                        GrantDTO::target,
                        Collectors.mapping(GrantDTO::grantee, Collectors.toSet())
                ));
    }
@Test
    @MongoDBFixtures("grants.json")
    public void getOwnersForTargets() {
        final GRN jane = grnRegistry.parse("grn::::user:jane");
        final GRN john = grnRegistry.parse("grn::::user:john");

        final GRN dashboard1 = grnRegistry.parse("grn::::dashboard:54e3deadbeefdeadbeef0000");
        final GRN dashboard2 = grnRegistry.parse("grn::::dashboard:54e3deadbeefdeadbeef0001");
        final GRN stream1 = grnRegistry.parse("grn::::stream:54e3deadbeefdeadbeef0001");

        assertThat(dbService.getOwnersForTargets(ImmutableSet.of(dashboard1, dashboard2, stream1))).satisfies(result -> {
            assertThat(result.get(dashboard1)).containsExactlyInAnyOrder(jane);
            assertThat(result.get(dashboard2)).containsExactlyInAnyOrder(john);
            assertThat(result).doesNotContainKey(stream1);
        });
    }