public void testMultiRel() {
   LinkHeaderFieldParser lhfp =
       new LinkHeaderFieldParser(Collections.singletonList(",<a>; rel=\"a b\""));
   assertEquals("a", lhfp.getFirstTargetForRelation("a"));
 }
 public void testCommas() {
   LinkHeaderFieldParser lhfp =
       new LinkHeaderFieldParser(Collections.singletonList(",<a>; rel=\"xy,z\","));
   assertEquals("a", lhfp.getFirstTargetForRelation("xy,z"));
 }
 public void testTruncated() {
   LinkHeaderFieldParser lhfp =
       new LinkHeaderFieldParser(Collections.singletonList("<a,>; rel=\"x\\\""));
   assertEquals("a,", lhfp.getFirstTargetForRelation("x\\"));
 }
 public void testMultiQs() {
   LinkHeaderFieldParser lhfp =
       new LinkHeaderFieldParser(
           Collections.singletonList("<a,>; rel=\"fo\\\"o,\", <b,>; rel=bar"));
   assertEquals("b,", lhfp.getFirstTargetForRelation("bar"));
 }
 public void testMulti() {
   LinkHeaderFieldParser lhfp =
       new LinkHeaderFieldParser(Collections.singletonList("<a>; rel=foo, <b>; rel=bar"));
   assertEquals("b", lhfp.getFirstTargetForRelation("bar"));
 }
 public void testSimple() {
   LinkHeaderFieldParser lhfp =
       new LinkHeaderFieldParser(Collections.singletonList("<a>; rel=foo"));
   assertEquals("a", lhfp.getFirstTargetForRelation("foo"));
 }