@Test
public void createsAcceptMediaTypeListFromHeader() {

    String header = "text/xml;  charset=utf8;q=0.825,    text/html;charset=utf8,  text/plain;charset=utf8;q=0.8";
    List<AcceptMediaType> acceptMediaTypeList = HeaderHelper.createAcceptMediaTypeList(header);
    List<AcceptMediaType> expectedAcceptMediaTypeList = newArrayList(
            new AcceptMediaType("text", "html", ImmutableMap.of("charset", "utf8")),
            new AcceptMediaType("text", "xml", ImmutableMap.of("charset", "utf8", "q", "0.825")),
            new AcceptMediaType("text", "plain", ImmutableMap.of("charset", "utf8", "q", "0.8")));
    assertEquals(expectedAcceptMediaTypeList, acceptMediaTypeList);
}