private void VerifyEveryMachineHasOnlyOneOperationAtAnyTime(IAggregator aggregator)
        {
            IDbMasterDataCache dbMasterDataCache =
                ZppConfiguration.CacheManager.GetMasterDataCache();

            foreach (var resource in dbMasterDataCache.ResourceGetAll())
            {
                List <ProductionOrderOperation> operations =
                    aggregator.GetAllOperationsOnResource(resource.GetValue());
                T_ProductionOrderOperation lastOperation = null;
                foreach (var operation in operations.OrderBy(x => x.GetValue().Start))
                {
                    T_ProductionOrderOperation tOperation = operation.GetValue();
                    if (lastOperation == null)
                    {
                        lastOperation = operation.GetValue();
                    }
                    else
                    {
                        Assert.True(lastOperation.End <= tOperation.Start,
                                    $"Operations are overlapping: '{lastOperation}' and {tOperation}'.");
                    }
                }
            }
        }