@Test
public void indices_exist_throws_correct_exception_when_underlying_client_throws() throws Exception {

    when(client.admin()).thenThrow(new RuntimeException());
    TestUtils.assertThrows(() -> ElasticSearchUtils.indexExist(client, ""), IndicesExistsFailedException.class);
}