@Test public void test_should_add_correlation_id_request_header() { final RequestContext currentContext = RequestContext.getCurrentContext(); final MockHttpServletRequest request = new MockHttpServletRequest(); request.setMethod("GET"); currentContext.setRequest(request); final String expectedCorrelationId = "someCorrelationId"; currentContext.set("CORRELATION_ID", expectedCorrelationId); filter.run(); final Map<String, String> zuulRequestHeaders = currentContext.getZuulRequestHeaders(); assertEquals(2, zuulRequestHeaders.size()); assertEquals(expectedCorrelationId, zuulRequestHeaders.get("x-correlation-id")); }
@Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; }
RequestEnrichmentFilter extends ZuulFilter { @Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; } }
RequestEnrichmentFilter extends ZuulFilter { @Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; } RequestEnrichmentFilter(); }
RequestEnrichmentFilter extends ZuulFilter { @Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; } RequestEnrichmentFilter(); @Override String filterType(); @Override int filterOrder(); @Override boolean shouldFilter(); @Override Object run(); }
RequestEnrichmentFilter extends ZuulFilter { @Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; } RequestEnrichmentFilter(); @Override String filterType(); @Override int filterOrder(); @Override boolean shouldFilter(); @Override Object run();  }