public async Task WebhooksServiceProcessMessageAsyncContentThrowsErrorForInvalidUrl()
        {
            // Arrange
            const ContentCacheStatus isContentItem = ContentCacheStatus.ContentItem;
            var url     = "/somewhere.com";
            var service = BuildWebhooksService();

            A.CallTo(() => FakeContentCacheService.CheckIsContentItem(A <Guid> .Ignored)).Returns(isContentItem);

            // Act
            await Assert.ThrowsAsync <InvalidDataException>(async() => await service.ProcessMessageAsync(WebhookCacheOperation.CreateOrUpdate, Guid.NewGuid(), ContentIdForCreate, url).ConfigureAwait(false)).ConfigureAwait(false);

            // Assert
            A.CallTo(() => FakeContentCacheService.CheckIsContentItem(A <Guid> .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => FakeWebhookContentProcessor.DeleteContentItemAsync(A <Guid> .Ignored)).MustNotHaveHappened();
            A.CallTo(() => FakeWebhookContentProcessor.DeleteContentAsync(A <Guid> .Ignored)).MustNotHaveHappened();
            A.CallTo(() => FakeWebhookContentProcessor.ProcessContentItemAsync(A <Uri> .Ignored, A <Guid> .Ignored)).MustNotHaveHappened();
            A.CallTo(() => FakeWebhookContentProcessor.ProcessContentAsync(A <Uri> .Ignored, A <Guid> .Ignored)).MustNotHaveHappened();
        }
        public async Task WebhooksServiceProcessMessageAsyncNoneOptionReturnsBadRequest()
        {
            // Arrange
            const ContentCacheStatus isContentItem    = ContentCacheStatus.ContentItem;
            const HttpStatusCode     expectedResponse = HttpStatusCode.BadRequest;
            var url     = "https://somewhere.com";
            var service = BuildWebhooksService();

            A.CallTo(() => FakeContentCacheService.CheckIsContentItem(A <Guid> .Ignored)).Returns(isContentItem);

            // Act
            var result = await service.ProcessMessageAsync(WebhookCacheOperation.None, Guid.NewGuid(), ContentIdForCreate, url).ConfigureAwait(false);

            // Assert
            A.CallTo(() => FakeContentCacheService.CheckIsContentItem(A <Guid> .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => FakeWebhookContentProcessor.DeleteContentItemAsync(A <Guid> .Ignored)).MustNotHaveHappened();
            A.CallTo(() => FakeWebhookContentProcessor.DeleteContentAsync(A <Guid> .Ignored)).MustNotHaveHappened();
            A.CallTo(() => FakeWebhookContentProcessor.ProcessContentItemAsync(A <Uri> .Ignored, A <Guid> .Ignored)).MustNotHaveHappened();
            A.CallTo(() => FakeWebhookContentProcessor.ProcessContentAsync(A <Uri> .Ignored, A <Guid> .Ignored)).MustNotHaveHappened();

            Assert.Equal(expectedResponse, result);
        }