in src/main/java/org/apache/sling/commons/testing/integration/TestInfoPassingClient.java [50:62]
private static void addSlingHeaders(HttpMethod m){
Map<?,?> mdc = MDC.getCopyOfContextMap();
if (mdc != null) {
for (Map.Entry<?, ?> e : mdc.entrySet()) {
Object key = e.getKey();
if (key instanceof String
&& ((String)key).startsWith(SLING_HEADER_PREFIX)
&& e.getValue() instanceof String) {
m.addRequestHeader((String) key, (String) e.getValue());
}
}
}
}