Assert.assertEquals(offered2, MarmottaHttpUtils.bestContentType(offered,accepted));
}
@Test
public void testGetBestMatch2() throws Exception {
ContentType offered1 = new ContentType("text","html");
ContentType offered2 = new ContentType("application","rdf+json");
ContentType offered3 = new ContentType("application","ld+json");
List<ContentType> offered = new ArrayList<ContentType>(3);
offered.add(offered1);
offered.add(offered2);
offered.add(offered3);
ContentType accepted1 = new ContentType("application","xml");
ContentType accepted2 = new ContentType("*","*");
List<ContentType> accepted = new ArrayList<ContentType>(2);
accepted.add(accepted1);
accepted.add(accepted2);
Assert.assertEquals(offered1, MarmottaHttpUtils.bestContentType(offered,accepted));