public async Task DefaultGroupsAreCreated(GroupType type, string groupName)
        {
            _groupRepositoryMock
            .Setup(m => m.CreateItemAsync(It.IsAny <Group>(), It.IsAny <CancellationToken>()))
            .ReturnsAsync(new Group());

            _groupRepositoryMock.SetupCreateItemQuery(o => new List <Group>());

            var tenantId = Guid.NewGuid();
            await _controller.CreateBuiltInGroupsAsync(tenantId);

            _groupRepositoryMock.Verify(y => y.CreateItemAsync(It.Is <Group>(x =>
                                                                             x.TenantId == tenantId && x.Name == groupName &&
                                                                             x.IsLocked && x.Type == type), It.IsAny <CancellationToken>()));
        }
 public async Task HandleEventAsync(Tenant tenant)
 {
     await _policyChangesController.CreateBuiltInGroupsAsync(tenant.Id.GetValueOrDefault());
 }