### Question:
GoogleHttpClientEdgeGridRequestSigner extends AbstractEdgeGridRequestSigner<HttpRequest, HttpRequest> { public void sign(HttpRequest request) throws RequestSigningException { sign(request, request); } GoogleHttpClientEdgeGridRequestSigner(ClientCredential clientCredential);  GoogleHttpClientEdgeGridRequestSigner(ClientCredentialProvider clientCredentialProvider); void sign(HttpRequest request);  }### Answer:
@Test public void signEachRequest() throws URISyntaxException, IOException, RequestSigningException { HttpTransport HTTP_TRANSPORT = new ApacheHttpTransport(); HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory(); URI uri = URI.create("https: HttpRequest request = requestFactory.buildGetRequest(new GenericUrl(uri)); GoogleHttpClientEdgeGridRequestSigner googleHttpSigner = new GoogleHttpClientEdgeGridRequestSigner(credential); googleHttpSigner.sign(request, request); assertThat(request.getHeaders().containsKey("host"), is(false)); assertThat(request.getUrl().getHost(), equalTo("endpoint.net")); assertThat(request.getHeaders().containsKey("authorization"), is(true)); assertThat(request.getHeaders().getAuthorization(), not(isEmptyOrNullString())); }
@Test public void signWithHostHeader() throws URISyntaxException, IOException, RequestSigningException { HttpTransport HTTP_TRANSPORT = new ApacheHttpTransport(); HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory(); URI uri = URI.create("https: HttpRequest request = requestFactory.buildGetRequest(new GenericUrl(uri)); request.getHeaders().put("Host", "ignored-hostname.com"); GoogleHttpClientEdgeGridRequestSigner googleHttpSigner = new GoogleHttpClientEdgeGridRequestSigner(credential); googleHttpSigner.sign(request, request); assertThat(request.getHeaders().containsKey("Host"), is(false)); assertThat(request.getHeaders().containsKey("host"), is(true)); assertThat((String) request.getHeaders().get("host"), equalTo("endpoint.net")); assertThat(request.getUrl().getHost(), equalTo("endpoint.net")); assertThat(request.getHeaders().containsKey("authorization"), is(true)); assertThat(request.getHeaders().getAuthorization(), not(isEmptyOrNullString())); }