public void TestReservesCacheInDb()
        {
            var idList = new List<IdGeneratorNode>
                {

                    new IdGeneratorNode{ CurrentId = 1, GroupName = "Test"}
                };
            A.CallTo(() => _idRepoService.GetAll()).Returns(idList);

            _idGenerator.LoadGenerator(3);

            A.CallTo(() => _idRepoService.UpdateOrInsert(GetFakeIdNode2(4,"Test"), null)).MustHaveHappened();
            //    A.CallTo(() => _idRepoService.UpdateOrInsert(, null)).MustHaveHappened();

            var genNode = new IdGeneratorNode
            {
                GroupName = "IdGeneratorNode",
                Id = 1,
                CurrentId = 3
            };
            //    A.CallTo(() => _idRepoService.UpdateOrInsert(genNode, null)).MustHaveHappened();
        }
 public void CreateOrUpdateIdNode(string groupName, long newCacheSize, long id)
 {
     var repoNode = new IdGeneratorNode { Id = id, CurrentId = newCacheSize, GroupName = groupName };
     _idRepoService.UpdateOrInsert(repoNode, null);
 }