@NonNull
    static LinkNavigation findPostNavigation(List<String> postNames, String target) {
        Assert.notNull(target, "Target post name must not be null");
        for (int i = 0; i < postNames.size(); i++) {
            var item = postNames.get(i);
            if (target.equals(item)) {
                var prevLink = (i > 0) ? postNames.get(i - 1) : null;
                var nextLink = (i < postNames.size() - 1) ? postNames.get(i + 1) : null;
                return new LinkNavigation(prevLink, target, nextLink);
            }
        }
        return new LinkNavigation(null, target, null);
    }
@Test
    void postPreviousNextPair() {
        List<String> postNames = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            postNames.add("post-" + i);
        }

        // post-0, post-1, post-2
        var previousNextPair = PostFinderImpl.findPostNavigation(postNames, "post-0");
        assertThat(previousNextPair.prev()).isNull();
        assertThat(previousNextPair.next()).isEqualTo("post-1");

        previousNextPair = PostFinderImpl.findPostNavigation(postNames, "post-1");
        assertThat(previousNextPair.prev()).isEqualTo("post-0");
        assertThat(previousNextPair.next()).isEqualTo("post-2");

        // post-1, post-2, post-3
        previousNextPair = PostFinderImpl.findPostNavigation(postNames, "post-2");
        assertThat(previousNextPair.prev()).isEqualTo("post-1");
        assertThat(previousNextPair.next()).isEqualTo("post-3");

        // post-7, post-8, post-9
        previousNextPair = PostFinderImpl.findPostNavigation(postNames, "post-8");
        assertThat(previousNextPair.prev()).isEqualTo("post-7");
        assertThat(previousNextPair.next()).isEqualTo("post-9");

        previousNextPair = PostFinderImpl.findPostNavigation(postNames, "post-9");
        assertThat(previousNextPair.prev()).isEqualTo("post-8");
        assertThat(previousNextPair.next()).isNull();
    }