@@ -0,0 +1,1422 @@
+/*%0A  Copyright (C) 2013-2018 Expedia Inc.%0A%0A  Licensed under the Apache License, Version 2.0 (the %22License%22);%0A  you may not use this file except in compliance with the License.%0A  You may obtain a copy of the License at%0A%0A  http://www.apache.org/licenses/LICENSE-2.0%0A%0A  Unless required by applicable law or agreed to in writing, software%0A  distributed under the License is distributed on an %22AS IS%22 BASIS,%0A  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A  See the License for the specific language governing permissions and%0A  limitations under the License.%0A */%0Apackage com.hotels.styx.server;%0A%0Aimport com.hotels.styx.api.HttpInterceptor;%0A%0Aimport java.util.Map;%0Aimport java.util.concurrent.ConcurrentHashMap;%0A%0A/**%0A *%0A * TODO: This is duplicated from the %60server%60 package so that plugin tests are able%0A * to pass in a context for the %60handle%60 method.%0A *%0A * ConcurrentHashMap backed implementation of HttpInterceptor.Context.%0A */%0Apublic final class HttpInterceptorContext implements HttpInterceptor.Context %7B%0A    private final Map%3CString, Object%3E context = new ConcurrentHashMap%3C%3E();%0A%0A    @Override%0A    public void add(String key, Object value) %7B%0A        context.put(key, value);%0A    %7D%0A%0A    @Override%0A    public %3CT%3E T get(String key, Class%3CT%3E clazz) %7B%0A        return (T) context.get(key);%0A    %7D%0A%0A    public static HttpInterceptorContext create() %7B%0A        return new HttpInterceptorContext();%0A    %7D%0A%7D%0A

Add HttpInterceptorContext to styx-test-api. (#168)