### Question:
AbstractLinkProvider implements Serializable { public static AbstractLinkProvider fromParams(final AbstractAllParams<?> all) { switch (all.getVCat().getLinks()) { case Graph: return new VCatLinkProvider(all); case Wiki: return new WikiLinkProvider(all); default: return new EmptyLinkProvider(); } }  static AbstractLinkProvider fromParams(final AbstractAllParams<?> all); void addLinkToNode(final Node node, final String title); abstract String provideLink(final String title);  }### Answer:
@Test public void testFromParamsWiki() { TestAllParams params = new TestAllParams(); Metadata metadata = new Metadata("articlepath", "server", Collections.emptyMap(), Collections.emptyMap()); params.setMetadata(metadata); params.getVCat().setLinks(Links.Wiki); AbstractLinkProvider instance = AbstractLinkProvider.fromParams(params); assertTrue(instance instanceof WikiLinkProvider); }
@Test public void testFromParamsDefault() { TestAllParams params = new TestAllParams(); params.getVCat().setLinks(Links.None); AbstractLinkProvider instance = AbstractLinkProvider.fromParams(params); assertTrue(instance instanceof EmptyLinkProvider); }
@Test public void testFromParamsGraph() { TestAllParams params = new TestAllParams(); params.getVCat().setLinks(Links.Graph); AbstractLinkProvider instance = AbstractLinkProvider.fromParams(params); assertTrue(instance instanceof VCatLinkProvider); }