@Test public void mediaRangesWith_parameters() { final Accept appXml = new Accept(APPLICATION_XML, new Accept.Parameter[] { new Accept.Parameter("x", "y"), new Accept.Parameter("a", "b") }); final Accept appXhtml = new Accept(APPLICATION_XHTML_XML, new Accept.Parameter[] { new Accept.Parameter("y", "x"), new Accept.Parameter("b", "a") }, new Accept.Weight(0.9f)); final String headerValue = appXml.toString() + "," + appXhtml.toString(); final AcceptHeader acceptHeader = new AcceptHeader(headerValue); assertEquals(2, acceptHeader.getAccepts().size()); assertEquals(appXml, acceptHeader.getAccepts().get(0)); assertEquals(appXhtml, acceptHeader.getAccepts().get(1)); }
public List<Accept> getAccepts() { return accepts; }
AcceptHeader { public List<Accept> getAccepts() { return accepts; } }
AcceptHeader { public List<Accept> getAccepts() { return accepts; } AcceptHeader(final String headerValue); }
AcceptHeader { public List<Accept> getAccepts() { return accepts; } AcceptHeader(final String headerValue); List<Accept> getAccepts(); }
AcceptHeader { public List<Accept> getAccepts() { return accepts; } AcceptHeader(final String headerValue); List<Accept> getAccepts();  }