### Question:
BerlinGroupLinksRewriter implements LinksRewriter { protected Optional<String> retrieveVersion(String link) { return Optional.ofNullable(version); } BerlinGroupLinksRewriter(LinksTemplate linksTemplate,
                                    String host,
                                    String version); void registerPlaceholder(String placeholder,
                                    Function<String, Optional<String>> paramRetriever); @Override Map<String, HrefType> rewrite(Map<String, HrefType> links);  }### Answer:
@Test void retrieveVersion_success_existsInLink() { assertThat(berlinGroupLinksRewriter.retrieveVersion("https: .isEqualTo(Optional.of(VERSION)); }
@Test void retrieveVersion_failure_notExistsInLink() { assertThat(berlinGroupLinksRewriter.retrieveVersion("anylink")) .isEqualTo(Optional.of(VERSION)); }