### Question:
LinkBuilderImpl implements Builder { @Override public Link build(Object... values) { URI resolvedLinkUri = getResolvedUri(values); return new LinkImpl(resolvedLinkUri, new HashMap<String, String>(params)); }  @Override Link build(Object... values); @Override Link buildRelativized(URI requestUri, Object... values); @Override Builder link(Link link); @Override Builder link(String link); @Override Builder param(String name, String value); @Override Builder rel(String rel); @Override Builder title(String title); @Override Builder type(String type); @Override Builder uri(URI uri); @Override Builder uri(String uri); @Override Builder uriBuilder(UriBuilder builder); @Override Builder baseUri(URI uri); @Override Builder baseUri(String uri);  }### Answer:
@Test public void testBuild() throws Exception { Link.Builder linkBuilder = new LinkBuilderImpl(); Link prevLink = linkBuilder.uri("http: assertEquals("<http: }
@Test public void testBuildObjects() throws Exception { StringBuilder path1 = new StringBuilder().append("p1"); ByteArrayInputStream path2 = new ByteArrayInputStream("p2".getBytes()) { @Override public String toString() { return "p2"; } }; URI path3 = new URI("p3"); String expected = "<" + "http: Link.Builder builder = Link.fromUri("http: Link link = builder.build(path1, path2, path3); assertNotNull(link); assertEquals(link.toString(), expected); }
@Test @Ignore("to be fixed for TCK") public void testNoArgsThrowsUriBuilderExceptionTest() { Link.Builder builder = Link.fromUri("http: try { Link link = builder.build(); fail("No exception has been thrown for link " + link); } catch (UriBuilderException e) { } }
@Test public void testCreateFromMethod() throws Exception { Link.Builder linkBuilder = Link.fromMethod(TestResource.class, "consumesAppJson"); Link link = linkBuilder.build(); String resource = link.toString(); assertTrue(resource.contains("<consumesappjson>")); }