assertEquals(appPdf, acceptHeader.getAccepts().get(2).getMediaRange());
}
@Test
public void multipleMediaRangesWith_withQualityFactors() {
final Accept appXml = new Accept(APPLICATION_XML);
final Accept appXhtml = new Accept(APPLICATION_XHTML_XML, 0.9f);
final Accept appPdf = new Accept(APPLICATION_PDF, 0.4f);
final AcceptHeader acceptHeader = new AcceptHeader(appXml.toString() + "," + appXhtml.toString() + "," + appPdf.toString());
assertEquals(3, acceptHeader.getAccepts().size());
assertEquals(appXml, acceptHeader.getAccepts().get(0));
assertEquals(appXhtml, acceptHeader.getAccepts().get(1));
assertEquals(appPdf, acceptHeader.getAccepts().get(2));