### Question:
LinkHeaderProvider implements HeaderDelegate<Link> { public String toString(Link link) { StringBuilder sb = new StringBuilder(); sb.append('<'); sb.append(link.getUri()); sb.append('>'); String rels = link.getRel(); if (!rels.isEmpty()) { sb.append(';').append(REL).append('='); writeListParamValues(sb, rels); } if (link.getTitle() != null) { sb.append(';').append(TITLE).append("=\"").append(link.getTitle()).append('"'); } if (link.getType() != null) { sb.append(';').append(TYPE).append('=').append(link.getType()); } for (Map.Entry<String, String> entry : link.getParams().entrySet()) { if (KNOWN_PARAMETERS.contains(entry.getKey())) { continue; } sb.append(';').append(entry.getKey()).append('='); writeListParamValues(sb, entry.getValue()); } return sb.toString(); }  Link fromString(String value); String toString(Link link);  }### Answer:
@Test public void testFromSimpleString() { Link l = Link.valueOf("<http: assertEquals("http: }
@Test public void testFromSimpleString2() { Link l = Link.valueOf("</>"); assertEquals("/", l.getUri().toString()); }
@Test public void testFromComplexString() { Link l = Link.valueOf("<http: assertEquals("http: String rel = l.getRel(); assertEquals("next", rel); assertEquals("Next Link", l.getTitle()); assertEquals("text/xml", l.getType()); assertEquals("get", l.getParams().get("method")); }
@Test public void testToString() { String headerValue = "<http: String expected = "<http: Link l = Link.valueOf(headerValue); String result = l.toString(); assertEquals(expected, result); }