public boolean hasGrantFor(GRN grantee, Capability capability, GRN target) {
        return db.findOne(DBQuery.and(
                DBQuery.is(GrantDTO.FIELD_GRANTEE, grantee),
                DBQuery.is(GrantDTO.FIELD_CAPABILITY, capability),
                DBQuery.is(GrantDTO.FIELD_TARGET, target)
        )) != null;
    }
@Test
    @MongoDBFixtures("grants.json")
    public void hasGrantFor() {
        final GRN jane = grnRegistry.parse("grn::::user:jane");
        final GRN dashboard1 = grnRegistry.parse("grn::::dashboard:54e3deadbeefdeadbeef0000");
        final GRN stream1 = grnRegistry.parse("grn::::stream:54e3deadbeefdeadbeef0000");
        final GRN stream2 = grnRegistry.parse("grn::::stream:54e3deadbeefdeadbeef0001");

        assertThat(dbService.hasGrantFor(jane, Capability.VIEW, stream1)).isTrue();
        assertThat(dbService.hasGrantFor(jane, Capability.MANAGE, stream2)).isTrue();
        assertThat(dbService.hasGrantFor(jane, Capability.OWN, dashboard1)).isTrue();

        assertThat(dbService.hasGrantFor(jane, Capability.MANAGE, stream1)).isFalse();
        assertThat(dbService.hasGrantFor(jane, Capability.VIEW, dashboard1)).isFalse();
    }