use of org.graylog.security.BuiltinCapabilities in project graylog2-server by Graylog2.
the class EntitySharesServiceTest method setUp.
@BeforeEach
void setUp(MongoDBTestService mongodb, MongoJackObjectMapperProvider mongoJackObjectMapperProvider, GRNRegistry grnRegistry) {
this.grnRegistry = grnRegistry;
dbGrantService = new DBGrantService(mongodb.mongoConnection(), mongoJackObjectMapperProvider, this.grnRegistry);
lenient().when(entityDependencyResolver.resolve(any())).thenReturn(ImmutableSet.of());
lenient().when(entityDependencyPermissionChecker.check(any(), any(), any())).thenReturn(ImmutableMultimap.of());
lenient().when(granteeService.getAvailableGrantees(any())).thenReturn(ImmutableSet.of());
final EventBus serverEventBus = mock(EventBus.class);
this.entitySharesService = new EntitySharesService(dbGrantService, entityDependencyResolver, entityDependencyPermissionChecker, grnRegistry, granteeService, serverEventBus);
// TODO this is needed to initialize the CAPABILITIES field
new BuiltinCapabilities();
}
Aggregations