public TClient CreateCustomArmClient <TClient>(params object[] parameters) where TClient : Rest.ServiceClient <TClient>
        {
            TClient client = ManagementClients.FirstOrDefault(o => o is TClient) as TClient;

            if (client == null)
            {
                if (throwWhenNotAvailable)
                {
                    throw new ArgumentException(
                              string.Format("TestManagementClientHelper class wasn't initialized with the {0} client.",
                                            typeof(TClient).Name));
                }
                else
                {
                    var realClientFactory = new ClientFactory();
                    var newParameters     = new object[parameters.Length + 1];
                    Array.Copy(parameters, 0, newParameters, 1, parameters.Length);
                    newParameters[0] = HttpMockServer.CreateInstance();
                    var realClient = realClientFactory.CreateCustomArmClient <TClient>(newParameters);
                    return(realClient);
                }
            }

            IAzureClient azureClient = client as IAzureClient;

            if (azureClient != null)
            {
                azureClient.LongRunningOperationRetryTimeout = 0;
            }

            return(client);
        }