EncodingFilter implements ContainerResponseFilter { @SafeVarargs public static void enableFor(ResourceConfig rc, Class<? extends ContentEncoder>... encoders) { rc.registerClasses(encoders).registerClasses(EncodingFilter.class); }  @SafeVarargs static void enableFor(ResourceConfig rc, Class<? extends ContentEncoder>... encoders); @Override void filter(ContainerRequestContext request, ContainerResponseContext response);  }
@Test public void testEnableFor() { EncodingFilter filter = initializeAndGetFilter(); assertNotNull(filter); assertEquals(4, filter.getSupportedEncodings().size()); }