void uploadMetric(String json) throws IOException {
    Request request = buildHttpRequest(metricsServerUrl, json);
    execute(okHttpClient.newCall(request));
  }
@Test
  void uploadMetric() throws IOException {
    ArgumentCaptor<Request> requestCaptor = ArgumentCaptor.forClass(Request.class);
    settings.setProperty(SONAR_TELEMETRY_COMPRESSION.getKey(), false);
    underTest.start();

    underTest.uploadMetric(JSON);

    verify(okHttpClient).newCall(requestCaptor.capture());
    Request request = requestCaptor.getValue();
    assertThat(request.method()).isEqualTo("POST");
    assertThat(request.body().contentType()).isEqualTo(MediaType.parse("application/json; charset=utf-8"));
    Buffer body = new Buffer();
    request.body().writeTo(body);
    assertThat(body.readUtf8()).isEqualTo(JSON);
    assertThat(request.url()).hasToString(METRICS_TELEMETRY_URL);
  }