@Test
public void testWithExtraHeaders() {

  Map<String, List<String>> extraHeaders =
      createTestExtraHeaders("key1", "value1", "key1", "value2");
  GrpcCallContext ctx = GrpcCallContext.createDefault().withExtraHeaders(extraHeaders);
  Map<String, List<String>> moreExtraHeaders =
      createTestExtraHeaders("key1", "value2", "key2", "value2");
  ctx = ctx.withExtraHeaders(moreExtraHeaders);
  Map<String, List<String>> gotExtraHeaders = ctx.getExtraHeaders();
  Map<String, List<String>> expectedExtraHeaders =
      createTestExtraHeaders(
          "key1", "value1", "key1", "value2", "key1", "value2", "key2", "value2");
  Truth.assertThat(gotExtraHeaders).containsExactlyEntriesIn(expectedExtraHeaders);
}