}
@Test
public void testLinkheader2() throws Exception
{
LinkHeaderDelegate delegate = new LinkHeaderDelegate();
LinkHeader header = delegate.fromString("<http://example.org/>; rel=index;\n" +
" rel=\"start http://example.net/relation/other\"");
Assert.assertTrue(header.getLinksByRelationship().containsKey("index"));
Assert.assertTrue(header.getLinksByRelationship().containsKey("start"));
Assert.assertTrue(header.getLinksByRelationship().containsKey("http://example.net/relation/other"));
System.out.println(delegate.toString(header));
String str = delegate.toString(header);
header = delegate.fromString(str);
Assert.assertTrue(header.getLinksByRelationship().containsKey("index"));
Assert.assertTrue(header.getLinksByRelationship().containsKey("start"));
Assert.assertTrue(header.getLinksByRelationship().containsKey("http://example.net/relation/other"));
ClientRequest request = new ClientRequest(generateURL("/linkheader"));
request.header("link", "<http://example.org/>; rel=index;" +