static boolean subjectMatch(Subscription subscription, Reason.Subject reasonSubject) {
        Assert.notNull(subscription, "The subscription must not be null");
        Assert.notNull(reasonSubject, "The reasonSubject must not be null");
        final var sourceSubject = subscription.getSpec().getReason().getSubject();

        var matchSubject = new Subscription.ReasonSubject();
        matchSubject.setKind(reasonSubject.getKind());
        matchSubject.setApiVersion(reasonSubject.getApiVersion());

        if (StringUtils.isBlank(sourceSubject.getName())) {
            return sourceSubject.equals(matchSubject);
        }
        matchSubject.setName(reasonSubject.getName());
        return sourceSubject.equals(matchSubject);
    }
@Test
    void testSubjectMatch() {
        var subscriber = new Subscription.Subscriber();
        subscriber.setName("test");
        Subscription subscription = createSubscription(subscriber);

        when(subscriptionService.listByPerPage(anyString()))
            .thenReturn(Flux.just(subscription));

        var reason = new Reason();
        reason.setSpec(new Reason.Spec());
        reason.getSpec().setReasonType("new-comment-on-post");
        reason.getSpec().setSubject(new Reason.Subject());
        reason.getSpec().getSubject().setApiVersion("content.halo.run/v1alpha1");
        reason.getSpec().getSubject().setKind("Post");
        reason.getSpec().getSubject().setName("fake-post");

        recipientResolver.resolve(reason)
            .as(StepVerifier::create)
            .expectNext(new Subscriber(UserIdentity.of("test"), "fake-subscription"))
            .verifyComplete();

        verify(subscriptionService).listByPerPage(anyString());
    }