ConfigurableModule implements Module { @Override public Map<String, Filter> getFilters(ServerData data) { if (filters != null) return MapX.fromMap(filters).plusAll(extractMap(() -> Module.super.getFilters(data))); return Module.super.getFilters(data); }  ConfigurableModule withResourceConfigManager(Consumer<JaxRsProvider<T>> resourceConfigManager); ConfigurableModule withServerConfigManager(Consumer<WebServerProvider<?>> serverConfigManager); @Override Set<Object> getJaxRsResourceObjects(); @Override Consumer<WebServerProvider<T>> getServerConfigManager(); @Override Consumer<JaxRsProvider<T>> getResourceConfigManager(); @Override List<String> getDefaultJaxRsPackages(); @Override Set<Class<?>> getRestResourceClasses(); @Override Set<Class<? extends Annotation>> getRestAnnotationClasses(); @Override List<Class<?>> getDefaultResources(); @Override List<ServletContextListener> getListeners(ServerData data); @Override List<ServletRequestListener> getRequestListeners(ServerData data); @Override Map<String, Filter> getFilters(ServerData data); @Override Map<String, Servlet> getServlets(ServerData data); @Override String getJaxWsRsApplication(); @Override String getProviders(); @Override String getContext(); @Override Set<Class<?>> getSpringConfigurationClasses(); @Override Map<String, Object> getServerProperties();  }
@Test public void testGetFilters() { assertThat(module.getFilters(ServerData.builder().resources(LinkedListX.of()).build()).size(), is(1 )); }
@Test public void testGetFiltersReset() { assertThat(module.withResetAll(true).getFilters(ServerData.builder().resources(LinkedListX.of()).build()),is(this.filters)); }
@Test public void testGetFiltersUnchanged() { assertThat(unchanged.getFilters(ServerData.builder().resources(LinkedListX.of()).build()).size(), equalTo(m.getFilters( ServerData.builder().resources(LinkedListX.of()).build() ).size())); }
@Test public void testWithFilters() { assertThat(unchanged.withFilters(this.filters).getFilters(ServerData.builder().resources(LinkedListX.of()).build()).size(), is(module.getFilters(ServerData.builder().resources(LinkedListX.of()).build()).size())); }