public void testLinksWithReset() {
MetadataMap<String, Object> m = new MetadataMap<String, Object>();
m.add("Link", Link.valueOf("<http://example.com/page3>;rel=\"next\""));
RuntimeDelegateImpl delegate = new RuntimeDelegateImpl();
Link.Builder linkBuilder = delegate.createLinkBuilder();
Link prevLink = linkBuilder.uri("http://example.com/page1").rel("previous").build();
linkBuilder = delegate.createLinkBuilder();
Link nextLink = linkBuilder.uri("http://example.com/page3").rel("next").build();
// CHECK: Should .links() do a reset? Undocumented feature; so we'll
// test with the awkward <code>(Link[])null</code> instead..
// Note: .cookie() has same behavior.
checkBuild(Response.ok().links(prevLink).links((Link[])null).links(nextLink).build(), 200, null, m);
}