### Question:
WikiLinkProvider extends AbstractLinkProvider { @Override public String provideLink(final String title) { return pattern.replace("$1", escapeMediawikiTitleForUrl(title)); } WikiLinkProvider(final AbstractAllParams<?> all); @Override String provideLink(final String title);  }### Answer:
@Test public void testProvideLink() { TestAllParams params = new TestAllParams(); Metadata metadata = new Metadata("articlepath/$1", "https: Collections.emptyMap()); params.setMetadata(metadata); WikiLinkProvider underTest = new WikiLinkProvider(params); assertEquals( "https: underTest.provideLink("abc:Äöü ßメインページ")); }
@Test public void testProvideLinkProtocolRelative() { TestAllParams params = new TestAllParams(); Metadata metadata = new Metadata("articlepath/$1", " params.setMetadata(metadata); WikiLinkProvider underTest = new WikiLinkProvider(params); assertEquals( "http: underTest.provideLink("abc:Äöü ßメインページ")); }