Assert.assertTrue(header.getLinksByRelationship().containsKey("previous"));
Assert.assertEquals(header.getLinksByTitle().get("previous chapter").getHref(), "http://example.com/TheBook/chapter2");
ClientRequest request = new ClientRequest(generateURL("/linkheader/str"));
request.addLink("previous chapter", "previous", "http://example.com/TheBook/chapter2", null);
ClientResponse response = request.post();
header = response.getLinkHeader();
Assert.assertNotNull(header);
Assert.assertTrue(header.getLinksByTitle().containsKey("previous chapter"));
Assert.assertTrue(header.getLinksByRelationship().containsKey("previous"));
Assert.assertEquals(header.getLinksByTitle().get("previous chapter").getHref(), "http://example.com/TheBook/chapter2");