@Override
    public Result reconcile(Request request) {
        client.fetch(SinglePage.class, request.name())
            .ifPresent(singlePage -> {
                if (ExtensionOperator.isDeleted(singlePage)) {
                    cleanUpResourcesAndRemoveFinalizer(request.name());
                    return;
                }

                if (ExtensionUtil.addFinalizers(singlePage.getMetadata(), Set.of(FINALIZER_NAME))) {
                    client.update(singlePage);
                }

                subscribeNewCommentNotification(singlePage);

                // reconcile spec first
                reconcileSpec(request.name());
                // then
                reconcileMetadata(request.name());
                reconcileStatus(request.name());
            });
        return new Result(false, null);
    }
@Test
    void reconcile() {
        String name = "page-A";
        SinglePage page = pageV1();
        page.getSpec().setHeadSnapshot("page-A-head-snapshot");
        page.getSpec().setReleaseSnapshot(page.getSpec().getHeadSnapshot());
        when(client.fetch(eq(SinglePage.class), eq(name)))
            .thenReturn(Optional.of(page));
        when(singlePageService.getContent(eq(page.getSpec().getReleaseSnapshot()),
            eq(page.getSpec().getBaseSnapshot())))
            .thenReturn(Mono.just(ContentWrapper.builder()
                .snapshotName(page.getSpec().getHeadSnapshot())
                .raw("hello world")
                .content("<p>hello world</p>")
                .rawType("markdown")
                .build())
            );

        Snapshot snapshotV1 = snapshotV1();
        Snapshot snapshotV2 = TestPost.snapshotV2();
        snapshotV1.getSpec().setContributors(Set.of("guqing"));
        snapshotV2.getSpec().setContributors(Set.of("guqing", "zhangsan"));
        when(client.listAll(eq(Snapshot.class), any(), any()))
            .thenReturn(List.of(snapshotV1, snapshotV2));
        when(externalUrlSupplier.get()).thenReturn(URI.create(""));

        when(extensionGetter.getEnabledExtension(eq(ExcerptGenerator.class)))
            .thenReturn(Mono.empty());

        ArgumentCaptor<SinglePage> captor = ArgumentCaptor.forClass(SinglePage.class);
        singlePageReconciler.reconcile(new Reconciler.Request(name));

        verify(client, times(3)).update(captor.capture());

        SinglePage value = captor.getValue();
        assertThat(value.getStatus().getExcerpt()).isEqualTo("hello world");
        assertThat(value.getStatus().getContributors()).isEqualTo(List.of("guqing", "zhangsan"));
    }