FixedHeaderProvider implements HeaderProvider, Serializable { public static FixedHeaderProvider create(Map<String, String> headers) { checkKeys(headers.keySet()); return new AutoValue_FixedHeaderProvider(ImmutableMap.copyOf(headers)); }  @Override @Nullable abstract Map<String, String> getHeaders(); static FixedHeaderProvider create(Map<String, String> headers); static FixedHeaderProvider create(String... keyValuePairs);  }
@Test(expected = IllegalArgumentException.class) public void testCreateFail() { Map<String, String> headers = ImmutableMap.of("User-Agent", "hello1", "user-agent", "hello2"); FixedHeaderProvider.create(headers); }
@Test(expected = IllegalArgumentException.class) public void testCreateVarargFail() { FixedHeaderProvider.create("User-Agent", "hello1", "user-agent", "hello2"); }
@Test(expected = IllegalArgumentException.class) public void testCreateVarargOddNumberOfParamsFail() { FixedHeaderProvider.create("User-Agent", "hello1", "Custom-Header"); }