String createPermalink(SinglePage page) {
        var permalink = encodePath(page.getSpec().getSlug(), UTF_8);
        permalink = StringUtils.prependIfMissing(permalink, "/");
        return externalUrlSupplier.get().resolve(permalink).normalize().toString();
    }
@Test
    void createPermalink() {
        SinglePage page = pageV1();
        page.getSpec().setSlug("page-slug");

        when(externalUrlSupplier.get()).thenReturn(URI.create(""));

        String permalink = singlePageReconciler.createPermalink(page);
        assertThat(permalink).isEqualTo("/page-slug");

        when(externalUrlSupplier.get()).thenReturn(URI.create("http://example.com"));
        permalink = singlePageReconciler.createPermalink(page);
        assertThat(permalink).isEqualTo("http://example.com/page-slug");

        page.getSpec().setSlug("中文 slug");
        permalink = singlePageReconciler.createPermalink(page);
        assertThat(permalink).isEqualTo("http://example.com/%E4%B8%AD%E6%96%87%20slug");
    }