@Test
public void testVariant2() throws Exception {
List<String> encoding = Arrays.asList("gzip", "compress");
MediaType mt = MediaType.APPLICATION_JSON_TYPE;
ResponseBuilder rb = Response.ok();
rb = rb.variants(getVariantList(encoding, mt).toArray(new Variant[0]));
Response response = rb.build();
List<Object> enc = response.getHeaders().get(HttpHeaders.CONTENT_ENCODING);
assertTrue(encoding.containsAll(enc));
List<Object> ct = response.getHeaders().get(HttpHeaders.CONTENT_TYPE);
assertTrue(ct.contains(mt));