@Test public void resolvesConfigurationContext() { LiveHttpRequest request = get("/").build(); Configuration.Context context = context(ImmutableMap.of("key1", "value1", "key2", "value2")); ConfigurationContextResolver configurationContextResolver = configurationContextResolver(request, context); ConfigurationContextResolverInterceptor interceptor = new ConfigurationContextResolverInterceptor(configurationContextResolver); TestChain chain = new TestChain(); Eventual<LiveHttpResponse> responseObservable = interceptor.intercept(request, chain); assertThat(Mono.from(responseObservable).block(), hasStatus(OK)); assertThat(chain.proceedWasCalled, is(true)); assertThat(chain.context().get("config.context", Configuration.Context.class), is(context)); }
@Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { Configuration.Context context = configurationContextResolver.resolve(request); chain.context().add("config.context", context); return chain.proceed(request); }
ConfigurationContextResolverInterceptor implements HttpInterceptor { @Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { Configuration.Context context = configurationContextResolver.resolve(request); chain.context().add("config.context", context); return chain.proceed(request); } }
ConfigurationContextResolverInterceptor implements HttpInterceptor { @Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { Configuration.Context context = configurationContextResolver.resolve(request); chain.context().add("config.context", context); return chain.proceed(request); } ConfigurationContextResolverInterceptor(ConfigurationContextResolver configurationContextResolver); }
ConfigurationContextResolverInterceptor implements HttpInterceptor { @Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { Configuration.Context context = configurationContextResolver.resolve(request); chain.context().add("config.context", context); return chain.proceed(request); } ConfigurationContextResolverInterceptor(ConfigurationContextResolver configurationContextResolver); @Override Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain); }
ConfigurationContextResolverInterceptor implements HttpInterceptor { @Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { Configuration.Context context = configurationContextResolver.resolve(request); chain.context().add("config.context", context); return chain.proceed(request); } ConfigurationContextResolverInterceptor(ConfigurationContextResolver configurationContextResolver); @Override Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain);  }