private static void ValidateNetworkProviderOperations(ProviderOperationsMetadata provider)
        {
            Assert.NotNull(provider);

            // check for expected Resourcetype
            ResourceType resourceType = provider.ResourceTypes.FirstOrDefault(rt => rt.Name.Equals("networksecuritygroups/providers/Microsoft.Insights/logDefinitions"));
            Assert.NotNull(resourceType);

            Operation op = resourceType.Operations.FirstOrDefault(p => p.Name.Equals("Microsoft.Network/networksecuritygroups/providers/Microsoft.Insights/logDefinitions/read"));
            Assert.NotNull(op);

            Assert.Equal<string>("system", op.Origin);

            Assert.True(op.Properties != null && op.Properties.ToString().Contains("serviceSpecification"));
        }
        private static IEnumerable<PSResourceProviderOperation> GetPSOperationsFromProviderOperationsMetadata(ProviderOperationsMetadata providerOperationsMetadata)
        {
            IEnumerable<PSResourceProviderOperation> operations = providerOperationsMetadata.Operations.Where(op => GetAzureProviderOperationCommand.IsUserOperation(op))
                        .Select(op => ToPSResourceProviderOperation(op, providerOperationsMetadata.DisplayName));
            if (providerOperationsMetadata.ResourceTypes != null)
            {
                operations = operations.Concat(providerOperationsMetadata.ResourceTypes.SelectMany(rt => rt.Operations.Where(op => GetAzureProviderOperationCommand.IsUserOperation(op))
                    .Select(op => ToPSResourceProviderOperation(op, providerOperationsMetadata.DisplayName, rt.DisplayName))));
            }

            return operations;
        }
        private static void ValidateSqlProviderOperations(ProviderOperationsMetadata provider)
        {
            Assert.NotNull(provider);

            ResourceType resourceType = provider.ResourceTypes.FirstOrDefault(rt => rt.Name.Equals("servers"));
            Assert.NotNull(resourceType);

            Operation op = resourceType.Operations.FirstOrDefault(p => p.Name.Equals("Microsoft.Sql/servers/write"));
            Assert.NotNull(op);

            Assert.Null(op.Origin);
            Assert.Null(op.Properties);
        }