@Test
public void nonEsExceptionWithWrappedEsExceptionCauseShouldCreateEsErrorMessage() {

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