/// <summary>
        /// Gets DataLakeStoreFileSystem client for the current test environment
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="factory"></param>
        /// <returns></returns>
        public static T GetDataLakeStoreFileSystemServiceClient <T>(
            TestEnvironmentFactory factory)
            where T : class
        {
            TestEnvironment currentEnvironment = factory.GetTestEnvironment();
            T client = null;

            ConstructorInfo constructor = typeof(T).GetConstructor(new Type[]
            {
                typeof(SubscriptionCloudCredentials),
                typeof(string)
            });

            client = constructor.Invoke(new object[]
            {
                currentEnvironment.Credentials as SubscriptionCloudCredentials,

                // Have to remove the https:// since this is a suffix
                currentEnvironment.Endpoints.DataLakeStoreServiceUri.OriginalString.Replace("https://", "")
            }) as T;

            return(TestBase.AddMockHandler <T>(ref client));
        }