WingtipsSpringWebfluxWebFilter implements WebFilter, Ordered { protected @NotNull Context subscriberContextWithTracingInfo( @NotNull Context origContext, @NotNull TracingState tracingState ) { return WingtipsSpringWebfluxUtils.subscriberContextWithTracingInfo(origContext, tracingState); } WingtipsSpringWebfluxWebFilter();  WingtipsSpringWebfluxWebFilter(Builder builder); static Builder newBuilder(); @Override @NotNull Mono<Void> filter(@NotNull ServerWebExchange exchange, @NotNull WebFilterChain chain); @Override int getOrder(); void setOrder(int order);  }
@Test public void subscriberContextWithTracingInfo_works_as_expected() { Map<String, String> origContextPairs = MapBuilder .builder("foo", UUID.randomUUID().toString()) .put("bar", UUID.randomUUID().toString()) .build(); Context origContext = Context.of(origContextPairs); TracingState tracingStateMock = mock(TracingState.class); Context result = filterSpy.subscriberContextWithTracingInfo(origContext, tracingStateMock); assertThat(result.size()).isEqualTo(origContextPairs.size() + 1); origContextPairs.forEach( (k, v) -> assertThat(result.<String>get(k)).isEqualTo(v) ); assertThat(result.get(TracingState.class)).isSameAs(tracingStateMock); }