HttpMethodOverrideFilter implements ContainerRequestFilter { public static void enableFor(final ResourceConfig rc, final Source... sources) { rc.registerClasses(HttpMethodOverrideFilter.class); rc.property(ServerProperties.HTTP_METHOD_OVERRIDE, sources); } HttpMethodOverrideFilter(@Context final Configuration rc);  HttpMethodOverrideFilter(final Source... sources); static void enableFor(final ResourceConfig rc, final Source... sources); @Override void filter(final ContainerRequestContext request);  }
@Test public void testEnableFor() { ResourceConfig rc = new ResourceConfig(); HttpMethodOverrideFilter.enableFor(rc, HttpMethodOverrideFilter.Source.HEADER); assertTrue(rc.getClasses().contains(HttpMethodOverrideFilter.class)); assertEquals(1, ((HttpMethodOverrideFilter.Source[]) rc.getProperty(ServerProperties.HTTP_METHOD_OVERRIDE)).length); assertEquals(HttpMethodOverrideFilter.Source.HEADER, ((HttpMethodOverrideFilter.Source[]) rc.getProperty(ServerProperties.HTTP_METHOD_OVERRIDE))[0]); }