@Test
public void createsAcceptedLanguageListFromHeader() throws Exception {

    String languages = "da;q=0.825,   en-GB,  en;q=0.8";
    List<AcceptLanguage> expectedAcceptedLanguageList =
            newArrayList(new AcceptLanguage(new Locale("en", "GB")), new AcceptLanguage(new Locale("da"), 0.825f), new AcceptLanguage(new Locale("en"), 0.8f));
    List<AcceptLanguage> acceptedLanguageList = HeaderHelper.createAcceptedLanguageList(languages);
    assertEquals(expectedAcceptedLanguageList, acceptedLanguageList);
}