private void AssertPostFileComposesMultiPartRequest <TResponse>(IReturn <TResponse> requestDto)
        {
            var postUrl        = $"http://somehost{requestDto.ToPostUrl()}";
            var queryString    = QueryStringSerializer.SerializeToString(requestDto);
            var isImport       = FileUploader.IsImportServiceUpload(postUrl);
            var streamToUpload = CreateMemoryStream(_mockFileSize);

            _uploader.PostFileWithRequest(postUrl, streamToUpload, _mockFilename, requestDto);

            var expectedUri = new UriBuilder(postUrl)
            {
                Query = queryString
            }.ToString();

            if (isImport)
            {
                _mockRestClient
                .Received(1)
                .Post <TResponse>(Arg.Is(expectedUri), Arg.Is <object>(content => IsImportServiceContent(content)));
            }
            else
            {
                _mockRestClient
                .Received(1)
                .Post <TResponse>(Arg.Is(expectedUri), Arg.Is <object>(content => IsFineUploaderContent(content)));
            }
        }
        public void IsImportServiceRoute_DetectsImportServiceRoutesCorrectly(string relativeOrAbsoluteUri, bool expected)
        {
            var actual = FileUploader.IsImportServiceUpload(relativeOrAbsoluteUri);

            actual.ShouldBeEquivalentTo(expected);

            if (actual)
            {
                FileUploader.IsImportServiceUpload(relativeOrAbsoluteUri.ToLowerInvariant()).ShouldBeEquivalentTo(true, "Lowercase of URL should also be true");
                FileUploader.IsImportServiceUpload(relativeOrAbsoluteUri.ToUpperInvariant()).ShouldBeEquivalentTo(true, "Uppercase of URL should also be true");
            }
        }