@Override
  public void close() {
    try {
      restHighLevelClient.close();
    } catch (IOException e) {
      throw new ElasticsearchException("Could not close ES Rest high level client", e);
    }
  }
@Test
  public void should_rethrow_ex_when_close_client_throws() throws IOException {
    doThrow(IOException.class).when(restClient).close();
    assertThatThrownBy(() -> underTest.close())
      .isInstanceOf(ElasticsearchException.class);
  }