public async Task GetMetricsByPeriod_ReturnOk()
        {
            var request = new HddMetricGetByPeriodQuery()
            {
                FromTime = DateTimeOffset.Now.AddDays(-5),
                ToTime   = DateTimeOffset.Now
            };

            _mockMediator.Setup(mediator => mediator.Send(It.IsAny <HddMetricGetByPeriodQuery>(), It.IsAny <CancellationToken>()))
            .ReturnsAsync(new AgentHddMetricResponse()
            {
                Metrics = new List <AgentHddMetricDto>()
                {
                    new AgentHddMetricDto()
                    {
                        Id    = 1,
                        Time  = DateTimeOffset.Now,
                        Value = 99
                    }
                }
            });

            var result = await _controller.GetMetricsByPeriod(request);

            var resultValue = ((OkObjectResult)result).Value as AgentHddMetricResponse;

            _mockMediator.Verify(mediator => mediator.Send(It.Is <HddMetricGetByPeriodQuery>(
                                                               m => m.FromTime == request.FromTime && m.ToTime == request.ToTime),
                                                           It.IsAny <CancellationToken>()), Times.Once);
            _mockMediator.Verify(mediator => mediator.Send(It.IsAny <HddMetricGetByPeriodQuery>(), It.IsAny <CancellationToken>()), Times.Once);
            Assert.Single(resultValue.Metrics);
            Assert.Equal(1, resultValue.Metrics[0].Id);
            Assert.Equal(99, resultValue.Metrics[0].Value);
            Assert.IsAssignableFrom <IActionResult>(result);
        }