@Override
    public boolean processArgument(final ShenyuRequest shenyuRequest, final Annotation annotation, final Object arg) {
        RequestTemplate requestTemplate = shenyuRequest.getRequestTemplate();
        CookieValue cookie = ANNOTATION.cast(annotation);
        String name = cookie.value().trim();
        checkState(emptyToNull(name) != null, "Cookie.name() was empty on parameter %s", requestTemplate.getMethod());
        Collection<String> cookieExpression = requestTemplate.getHeaders().getOrDefault(HttpHeaders.COOKIE, Lists.newArrayList());
        cookieExpression.add(String.format("%s=%s", name, arg));
        Map<String, Collection<String>> headers = shenyuRequest.getHeaders();
        headers.compute(HttpHeaders.COOKIE, (key, old) -> {
            if (CollectionUtils.isEmpty(old)) {
                return cookieExpression;
            }
            CollectionUtils.addAll(old, cookieExpression);
            return old;
        });
        shenyuRequest.setHeaders(headers);
        return true;
    }
@Test
    public void processArgumentTemplateTest() {
        RequestTemplate template = new RequestTemplate();
        final Map<String, Collection<String>> headers = Maps.newHashMap();
        headers.put(HttpHeaders.COOKIE, Lists.newArrayList("one=one"));
        template.setHeaders(headers);
        when(request.getRequestTemplate()).thenReturn(template);

        final CookieValue cookie = spy(CookieValue.class);
        when(cookie.value()).thenReturn("two");
        processor.processArgument(request, cookie, "twoValue");

        assertTrue(request.getHeaders().containsKey(HttpHeaders.COOKIE), "cookie value resolve fail");
        assertTrue(request.getHeaders().get(HttpHeaders.COOKIE).contains("two=twoValue"), "cookie value resolve error");
    }