ConfigurableModule implements Module { @Override public Map<String, Servlet> getServlets(ServerData data) { if (servlets != null) return MapX.fromMap(servlets).plusAll(extractMap(() -> Module.super.getServlets(data))); return Module.super.getServlets(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 testGetServlets() { assertThat(module.getServlets(ServerData.builder().resources(LinkedListX.of()).build()),is(this.servlets)); }
@Test public void testGetServletsUnchanged() { assertThat(unchanged.getServlets(ServerData.builder().resources(LinkedListX.of()).build()),is(m.getServlets(ServerData.builder().resources(LinkedListX.of()).build()))); }
@Test public void testWithServlets() { assertThat(unchanged.withServlets(this.servlets).getServlets(ServerData.builder().resources(LinkedListX.of()).build()).size(), is(m.getServlets(ServerData.builder().resources(LinkedListX.of()).build()).size())); }