GrpcClientRequest extends RpcClientRequest implements GrpcRequest { @Override protected void propagationField(String keyName, String value) { if (keyName == null) throw new NullPointerException("keyName == null"); if (value == null) throw new NullPointerException("value == null"); Key<String> key = nameToKey.get(keyName); if (key == null) { assert false : "We currently don't support setting headers except propagation fields"; return; } headers.removeAll(key); headers.put(key, value); } GrpcClientRequest(Map<String, Key<String>> nameToKey, MethodDescriptor<?, ?> methodDescriptor,
      CallOptions callOptions, ClientCall<?, ?> call, Metadata headers); @Override Object unwrap(); @Override String method(); @Override String service(); @Override MethodDescriptor<?, ?> methodDescriptor(); CallOptions callOptions(); ClientCall<?, ?> call(); @Override Metadata headers();  }
@Test public void propagationField() { request.propagationField("b3", "d"); assertThat(headers.get(b3Key)).isEqualTo("d"); }
@Test public void propagationField_replace() { headers.put(b3Key, "0"); request.propagationField("b3", "1"); assertThat(request.headers.get(b3Key)).isEqualTo("1"); }