private void testEncoding(String expected, String... accepted) throws IOException {
EncodingFilter filter = initializeAndGetFilter();
RequestContextBuilder builder = RequestContextBuilder.from("/resource", "GET");
for (String a : accepted) {
builder.header(HttpHeaders.ACCEPT_ENCODING, a);
}
ContainerRequest request = builder.build();
ContainerResponse response = new ContainerResponse(request, Response.ok("OK!").build());
filter.filter(request, response);
if (response.getStatus() != 200) {