public void TestRemoveRolesShouldRemoveSpecificRoles()
        {
            var collection = _database.GetCollection <ProcessDefinitionPersistence>(MongoProcessDefinitionPersistenceService.CollectionName);
            IProcessDefinitionPersisnenceService service = InstService();

            AccountData[] accounts = new[]
            {
                new AccountData
                {
                    AccountType  = 1,
                    Id           = Guid.NewGuid(),
                    Name         = "Underwriter",
                    SourceSystem = "ActiveDirectory"
                },
                new AccountData
                {
                    AccountType  = 1,
                    Id           = Guid.NewGuid(),
                    Name         = "Modeler",
                    SourceSystem = "ActiveDirectory"
                },
            };

            OnCreateFlowWithAssociatedSecutityAccounts(service, accounts);
            Assert.AreEqual(1, collection.Count(pd => true));
            IReadOnlyList <ProcessDefinitionDigest> flows = service.LisAlltWorkflows();

            Assert.IsNotNull(flows);
            Assert.AreEqual(1, flows.Count);
            ProcessDefinitionDigest flow = flows.ElementAt(0);

            service.RemoveRoles(flow.Id, flow.Version, accounts[0]);
            var idFilter
                = Builders <ProcessDefinitionPersistence> .Filter.Eq(r => r.Id, flow.Id);

            ProcessDefinitionPersistence persistence = collection.FindSync(idFilter).FirstOrDefault();

            Assert.IsNotNull(persistence);
            Assert.IsNotNull(persistence.Accounts);
            Assert.AreEqual(1, persistence.Accounts.Count);
            Assert.AreEqual(accounts[1].Name, persistence.Accounts[0].Name);
        }