@Override
    public ExecuteContext before(ExecuteContext context) {
        LogUtils.printHttpRequestBeforePoint(context);
        Object obj = context.getObject();
        if (obj instanceof HttpRequest && ThreadLocalUtils.getRequestData() == null) {
            HttpRequest request = (HttpRequest) obj;
            HttpHeaders headers = request.getHeaders();
            putIfAbsent(headers);
            String path = request.getURI().getPath();
            ThreadLocalUtils.setRequestData(new RequestData(headers, path, request.getMethod().name()));
        }
        return context;
    }
@Test
    public void testBefore() {
        Map<String, List<String>> header = new HashMap<>();
        header.put("bar", Collections.singletonList("bar1"));
        header.put("foo", Collections.singletonList("foo1"));
        ThreadLocalUtils.addRequestTag(header);
        interceptor.before(context);
        RequestData requestData = ThreadLocalUtils.getRequestData();
        Assert.assertNotNull(requestData);
        Assert.assertEquals(HttpMethod.GET.name(), requestData.getHttpMethod());
        Assert.assertEquals("/", requestData.getPath());
        Map<String, List<String>> headerData = requestData.getTag();
        Assert.assertEquals(3, headerData.size());
        Assert.assertEquals("bar2", headerData.get("bar").get(0));
        Assert.assertEquals("foo1", headerData.get("foo").get(0));
        Assert.assertEquals("bar3", headerData.get("bar3").get(0));
    }