public async Task CloudFileDirectoryListHandlesNullCaseTask() { // TODO add non-zero test cases if OpenHandle is ever available over REST CloudFileShare share = GetRandomShareReference(); try { await share.CreateAsync(); CloudFileDirectory dir = share.GetRootDirectoryReference().GetDirectoryReference("mydir"); await dir.CreateAsync(); FileContinuationToken token = null; List <FileHandle> handles = new List <FileHandle>(); do { FileHandleResultSegment response = await dir.ListHandlesSegmentedAsync(token, null, null, null, null, null, CancellationToken.None); handles.AddRange(response.Results); token = response.ContinuationToken; } while (token.NextMarker != null); Assert.AreEqual(0, handles.Count); } finally { await share.DeleteIfExistsAsync(); } }