public ClusterStatsResponse clusterStats() {
    return execute(() -> {
      Request request = new Request("GET", "/_cluster/stats");
      Response response = restHighLevelClient.getLowLevelClient().performRequest(request);
      return ClusterStatsResponse.toClusterStatsResponse(gson.fromJson(EntityUtils.toString(response.getEntity()), JsonObject.class));
    });
  }
@Test
  public void should_rethrow_ex_on_cluster_stat_fail() throws Exception {
    when(restClient.performRequest(argThat(new RawRequestMatcher(
      "GET",
      "/_cluster/stats"))))
      .thenThrow(IOException.class);

    assertThatThrownBy(() -> underTest.clusterStats())
      .isInstanceOf(ElasticsearchException.class);
  }