@Test
public void nonEsExceptionWithMultiLayerWrappedEsExceptionCauseShouldCreateEsErrorMessage() {

  Exception exception = new Exception(new Throwable(new Throwable(esThrowable)));
  ErrorMessage msg =
      ErrorMessageFactory.createErrorMessage(exception, RestStatus.BAD_REQUEST.getStatus());
  assertTrue(msg instanceof ElasticsearchErrorMessage);
}