@Override
    public Mono<Subscription> subscribe(Subscription.Subscriber subscriber,
        Subscription.InterestReason reason) {
        return unsubscribe(subscriber, reason)
            .then(Mono.defer(() -> {
                var subscription = new Subscription();
                subscription.setMetadata(new Metadata());
                subscription.getMetadata().setGenerateName("subscription-");
                subscription.setSpec(new Subscription.Spec());
                subscription.getSpec().setUnsubscribeToken(Subscription.generateUnsubscribeToken());
                subscription.getSpec().setSubscriber(subscriber);
                Subscription.InterestReason.ensureSubjectHasValue(reason);
                subscription.getSpec().setReason(reason);
                return client.create(subscription);
            }));
    }
@Test
    public void testSubscribe() {
        var spyNotificationCenter = spy(notificationCenter);
        Subscription subscription = createSubscriptions().get(0);

        var subscriber = subscription.getSpec().getSubscriber();

        var reason = subscription.getSpec().getReason();

        doReturn(Mono.empty())
            .when(spyNotificationCenter).unsubscribe(eq(subscriber), eq(reason));

        when(client.create(any(Subscription.class))).thenReturn(Mono.empty());

        spyNotificationCenter.subscribe(subscriber, reason).block();

        verify(client).create(any(Subscription.class));
    }