ConfigurableModule implements Module { @Override public List<ServletRequestListener> getRequestListeners(ServerData data) { if (requestListeners != null) return ListX.fromIterable(concat(this.requestListeners, extract(() -> Module.super.getRequestListeners(data)))); return Module.super.getRequestListeners(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 testGetRequestListeners() { assertThat(module.getRequestListeners(ServerData.builder().resources(LinkedListX.of()).build()).size(), is(m.getRequestListeners(ServerData.builder().resources(LinkedListX.of()).build()).size()*2)); }
@Test public void testGetRequestListenersReset() { assertThat(module.withResetAll(true).getRequestListeners(ServerData.builder().resources(LinkedListX.of()).build()),is(this.requestListeners)); }
@Test public void testGetRequestListenersUnchanged() { assertThat(unchanged.getRequestListeners(ServerData.builder().resources(LinkedListX.of()).build()).size() , is(m.getRequestListeners(ServerData.builder().resources(LinkedListX.of()).build()).size())); }