JaxrsModule extends AbstractConfigurationAwareModule { public JaxrsModule withOptionsEnabled() { enableOptions = true; return this; }  static JaxrsModule explicitJaxrsModule(); static Module adminOnlyJaxrsModule(); @Override void setup(Binder binder); JaxrsModule withOptionsEnabled();  }
@Test public void testEnableOptions() throws Exception { Injector injector = bootstrapTest() .withModules( new TestingNodeModule(), new JaxrsModule().withOptionsEnabled(), new JsonModule(), new ReportingModule(), new TestingHttpServerModule(), binder -> jaxrsBinder(binder).bind(TestingResource.class)) .initialize(); lifeCycleManager = injector.getInstance(LifeCycleManager.class); server = injector.getInstance(TestingHttpServer.class); Request request = Request.builder() .setUri(server.getBaseUrl().resolve("/")) .setMethod("OPTIONS") .build(); StatusResponse response = client.execute(request, createStatusResponseHandler()); assertEquals(response.getStatusCode(), Status.OK.getStatusCode(), "Status code"); assertNull(response.getHeader("Host")); }