@Override
  public void changeLogLevel(LoggerLevel level) {
    requireNonNull(level, "level can't be null");
    call(new ChangeLogLevelActionClient(level));
  }
@Test
  public void changeLogLevel_throws_ISE_if_http_error() {
    String message = "blah";
    server.enqueue(new MockResponse().setResponseCode(500).setBody(message));

    // initialize registration of process
    setUpWithHttpUrl(ProcessId.COMPUTE_ENGINE);

    assertThatThrownBy(() -> underTest.changeLogLevel(LoggerLevel.DEBUG))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("Failed to call HTTP server of process " + ProcessId.COMPUTE_ENGINE)
      .hasRootCauseInstanceOf(IOException.class)
      .hasRootCauseMessage(format("Failed to change log level in Compute Engine. Code was '500' and response was 'blah' for url " +
        "'http://%s:%s/changeLogLevel'", server.getHostName(), server.getPort()));
  }