@Override
    public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(
            ServerCall<ReqT, RespT> call,
            final Metadata requestHeaders,
            ServerCallHandler<ReqT, RespT> next) {
        // handle header
        if (requestHeaders != null) {
            extractTrafficTagFromCarrier(requestHeaders);
        }
        return next.startCall(new SimpleForwardingServerCall<ReqT, RespT>(call) {
        }, requestHeaders);
    }
@Test
    public void testInterceptCall() {
        // Configure parameters required by the grpc interceptor
        ServerCall call = Mockito.mock(ServerCall.class);
        ServerCallHandler handler = Mockito.mock(ServerCallHandler.class);
        Metadata metadata;
        Map<String, List<String>> expectTag;
        Key<String> name = Key.of("name", Metadata.ASCII_STRING_MARSHALLER);
        Key<String> id = Key.of("id", Metadata.ASCII_STRING_MARSHALLER);

        // metadata is null
        interceptor.interceptCall(call, null, handler);
        Assert.assertNull(TrafficUtils.getTrafficTag());

        // The metadata contains traffic labels that all match the matching rules, and the value is not null.
        metadata = new Metadata();
        metadata.put(id, "001");
        metadata.put(name, "test001");
        expectTag = new HashMap<>();
        expectTag.put("id", Collections.singletonList("001"));
        expectTag.put("name", Collections.singletonList("test001"));
        interceptor.interceptCall(call, metadata, handler);
        Assert.assertEquals(TrafficUtils.getTrafficTag().getTag(), expectTag);

        // metadata contains null traffic tag
        metadata = new Metadata();
        metadata.put(name, "null");
        metadata.put(id, "001");
        expectTag = new HashMap<>();
        expectTag.put("id", Collections.singletonList("001"));
        expectTag.put("name", null);
        interceptor.interceptCall(call, metadata, handler);
        Assert.assertEquals(TrafficUtils.getTrafficTag().getTag(), expectTag);
    }