metadata.putSingle(HttpHeaders.ACCEPT, "application/xml");
metadata.putSingle(HttpHeaders.ACCEPT_LANGUAGE, "en-us");
metadata.putSingle(HttpHeaders.ACCEPT_ENCODING, "gzip;q=1.0, compress");
List<Variant> list = new ArrayList<Variant>();
list.add(new Variant(MediaType.APPLICATION_JSON_TYPE, new Locale("en"), "gzip"));
Variant var2 = new Variant(MediaType.APPLICATION_XML_TYPE, new Locale("en"), "gzip");
list.add(var2);
Variant var3 = new Variant(MediaType.APPLICATION_XML_TYPE, new Locale("en"), null);
list.add(var3);
assertSame(var2, new RequestImpl(m).selectVariant(list));
list.clear();
list.add(var3);
assertSame(var3, new RequestImpl(m).selectVariant(list));