public async Task UpdateRange_Bad_Request_Object()
        {
            // Arrange
            var models = new object[]
            {
                new { Name = "Name 1" },
                new { Name = "Name 2" },
                new { Name = "Name 3" }
            };

            _mediator.Setup(x => x.Send(
                                It.Is <UpdateRangeRequest <object, object> >(y => y.Models == models),
                                It.IsAny <CancellationToken>()))
            .ThrowsAsync(new Exception());
            var controller = new FakeRangedClassController(_mediator.Object, Mock.Of <IMemoryCache>(), Mock.Of <IOptions <CacheOptions> >());

            // Act
            var updateRange = await controller.UpdateRange(models);

            // Assert
            var result = Assert.IsType <BadRequestObjectResult>(updateRange);

            _mediator.Verify(x => x.Publish(
                                 It.IsAny <UpdateRangeNotification <object> >(),
                                 It.IsAny <CancellationToken>()), Times.Exactly(2));
            Assert.Equal(models, result.Value);
        }
        public async Task UpdateRange_No_Content()
        {
            // Arrange
            var models = new object[]
            {
                new { Name = "Name 1" },
                new { Name = "Name 2" },
                new { Name = "Name 3" }
            };
            var keyValues = new[]
            {
                new object[] { new { } },
                new object[] { new { } },
                new object[] { new { } }
            };

            _mediator.Setup(x => x.Send(
                                It.Is <UpdateRangeRequest <object, object> >(y => y.Models == models),
                                It.IsAny <CancellationToken>()))
            .ReturnsAsync(keyValues);
            var cache = new Mock <IMemoryCache>();

            cache.Setup(x => x.CreateEntry(It.IsAny <object[]>())).Returns(Mock.Of <ICacheEntry>());
            var controller = new FakeRangedClassController(_mediator.Object, cache.Object, Mock.Of <IOptions <CacheOptions> >());

            // Act
            var updateRange = await controller.UpdateRange(models);

            // Assert
            Assert.IsType <NoContentResult>(updateRange);
            _mediator.Verify(x => x.Publish(
                                 It.IsAny <UpdateRangeNotification <object> >(),
                                 It.IsAny <CancellationToken>()), Times.Exactly(2));
        }