@Override
    public Mono<Void> remove(Subscription.Subscriber subscriber,
        Subscription.InterestReason interestReason) {
        Assert.notNull(subscriber, "The subscriber must not be null");
        Assert.notNull(interestReason, "The interest reason must not be null");
        var reasonType = interestReason.getReasonType();
        var expression = interestReason.getExpression();
        var subject = interestReason.getSubject();

        var listOptions = new ListOptions();
        var fieldQuery = and(isNull("metadata.deletionTimestamp"),
            equal("spec.subscriber", subscriber.toString()),
            equal("spec.reason.reasonType", reasonType));

        if (subject != null) {
            fieldQuery = and(fieldQuery, reasonSubjectMatch(subject));
        }
        if (StringUtils.isNotBlank(expression)) {
            fieldQuery = and(fieldQuery, equal("spec.reason.expression", expression));
        }
        listOptions.setFieldSelector(FieldSelector.of(fieldQuery));
        return paginatedOperator.deleteInitialBatch(Subscription.class, listOptions).then();
    }
@Test
    void remove() {
        var i = new AtomicLong(1L);
        when(client.delete(any(Subscription.class))).thenAnswer(invocation -> {
            var subscription = (Subscription) invocation.getArgument(0);
            if (i.get() != subscription.getMetadata().getVersion()) {
                return Mono.error(new OptimisticLockingFailureException("fake-exception"));
            }
            return Mono.just(subscription);
        });

        var subscription = new Subscription();
        subscription.setMetadata(new Metadata());
        subscription.getMetadata().setName("fake-subscription");
        subscription.getMetadata().setVersion(0L);

        when(client.fetch(eq(Subscription.class), eq("fake-subscription")))
            .thenAnswer(invocation -> {
                if (i.incrementAndGet() > 3) {
                    subscription.getMetadata().setVersion(i.get());
                } else {
                    subscription.getMetadata().setVersion(i.get() - 1);
                }
                return Mono.just(subscription);
            });

        subscriptionService.remove(subscription)
            .as(StepVerifier::create)
            .expectNextCount(1)
            .verifyComplete();

        // give version=0, but the real version is 1
        // give version=1, but the real version is 2
        // give version=2, but the real version is 3
        // give version=3, but the real version is 3 (delete success)
        verify(client, times(3)).fetch(eq(Subscription.class), eq("fake-subscription"));
    }