public void WillPublishFileCoverage()
        {
            var token      = new CancellationToken();
            var publisher  = new AzurePipelinesPublisher(_context, _mockClientFactory.Object, _mockFFHelper.Object, _mockHtmlPublisher.Object, _mockLogStoreHelper.Object, true);
            var mockClient = new Mock <TestManagementHttpClient>(new Uri("http://localhost"), new VssCredentials());

            var data = new Dictionary <string, string>();

            _mockClientFactory.Setup(x => x.GetClient <TestManagementHttpClient>()).Returns(mockClient.Object);
            _mockFFHelper.Setup(x => x.GetFeatureFlagState(
                                    It.Is <string>(a => a == Constants.FeatureFlags.EnablePublishToTcmServiceDirectlyFromTaskFF),
                                    It.Is <bool>(b => b == false))).Returns(false);

            _mockLogStoreHelper.Setup(x => x.UploadTestBuildLogAsync(
                                          It.IsAny <Guid>(),
                                          It.IsAny <int>(),
                                          It.IsAny <TestLogType>(),
                                          It.IsAny <string>(),
                                          It.IsAny <Dictionary <string, string> >(),
                                          It.IsAny <string>(),
                                          It.IsAny <bool>(),
                                          It.IsAny <CancellationToken>()))
            .Callback <Guid, int, TestLogType, string, Dictionary <string, string>, string, bool, CancellationToken>(
                (a, b, c, d, e, f, g, h) =>
            {
                data.Add(d, File.ReadAllText(d));
            })
            .Returns(Task.FromResult <TestLogStatus>(null));

            var fileCoverage = new List <FileCoverageInfo>()
            {
                new FileCoverageInfo()
                {
                    FilePath           = "C:\\a.cs",
                    LineCoverageStatus = new Dictionary <uint, CoverageStatus>()
                    {
                        { 1, CoverageStatus.Covered },
                        { 2, CoverageStatus.Covered },
                    }
                },

                new FileCoverageInfo()
                {
                    FilePath           = "C:\\b.cs",
                    LineCoverageStatus = new Dictionary <uint, CoverageStatus>()
                    {
                        { 1, CoverageStatus.Covered },
                        { 2, CoverageStatus.NotCovered },
                    }
                }
            };

            publisher.PublishFileCoverage(fileCoverage, token).Wait();

            _mockLogStoreHelper.Verify(x => x.UploadTestBuildLogAsync(
                                           It.Is <Guid>(a => a == _context.ProjectId),
                                           It.Is <int>(b => b == _context.BuildId),
                                           It.Is <TestLogType>(c => c == TestLogType.Intermediate),
                                           It.Is <string>(d => data.ContainsKey(d) && data[d] == JsonUtility.ToString(fileCoverage)),
                                           It.IsAny <Dictionary <string, string> >(),
                                           It.Is <string>(f => f == null),
                                           It.Is <bool>(g => g == true),
                                           It.Is <CancellationToken>(e => e == token)));
        }