public void Subscribe_HandlerNotRegistered_AddSubscription(
                [Frozen] Mock <IEventBusSubscriptionsManager> mockSubsManager,
                [Frozen] Mock <ServiceBusAdministrationClient> mockAdminClient,
                [Frozen] Mock <IServiceBusPersisterConnection> mockConnection,
                Mock <Response <SubscriptionProperties> > mockResponse,
                sb.EventBusServiceBus sut
                )
            {
                //Arrange
                mockAdminClient.Setup(_ => _.CreateSubscriptionAsync(
                                          It.IsAny <CreateSubscriptionOptions>(),
                                          It.IsAny <CreateRuleOptions>(),
                                          It.IsAny <CancellationToken>()
                                          ))
                .Returns(Task.FromResult(mockResponse.Object));

                mockConnection.Setup(_ => _.AdminClient)
                .Returns(mockAdminClient.Object);

                //Act
                sut.Subscribe <TestIntegrationEvent, TestIntegrationEventHandler>();

                //Assert
                mockAdminClient.Verify(_ => _.CreateSubscriptionAsync(
                                           It.IsAny <CreateSubscriptionOptions>(),
                                           It.IsAny <CreateRuleOptions>(),
                                           It.IsAny <CancellationToken>()
                                           ));

                mockSubsManager.Verify(
                    _ => _.AddSubscription <TestIntegrationEvent, TestIntegrationEventHandler>()
                    );
            }
            public void Subscribe_ServiceBusException_AddSubscriptionIsCalled(
                [Frozen] Mock <IEventBusSubscriptionsManager> mockSubsManager,
                [Frozen] Mock <ServiceBusAdministrationClient> mockAdminClient,
                [Frozen] Mock <IServiceBusPersisterConnection> mockConnection,
                sb.EventBusServiceBus sut
                )
            {
                //Arrange
                mockConnection.Setup(_ => _.AdminClient)
                .Throws <Exception>();

                mockSubsManager.Setup(_ => _.HasSubscriptionsForEvent <TestIntegrationEvent>())
                .Returns(false);

                //Act
                sut.Subscribe <TestIntegrationEvent, TestIntegrationEventHandler>();

                //Assert
                mockAdminClient.Verify(
                    _ => _.CreateSubscriptionAsync(
                        It.IsAny <CreateSubscriptionOptions>(),
                        It.IsAny <CancellationToken>()
                        ),
                    Times.Never
                    );

                mockSubsManager.Verify(
                    _ => _.AddSubscription <TestIntegrationEvent, TestIntegrationEventHandler>()
                    );
            }