# Unit Test Case for the High Level Rest Client?

**URL:** <https://discuss.elastic.co/t/unit-test-case-for-the-high-level-rest-client/195253>\
**Category:** Elasticsearch\
**Created:** [August 14, 2019, 7:37pm UTC](https://discuss.elastic.co/t/unit-test-case-for-the-high-level-rest-client/195253 "2019-08-14T19:37:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 15, 2019, 1:58am UTC](https://discuss.elastic.co/t/unit-test-case-for-the-high-level-rest-client/195253/2 "2019-08-15T01:58:01Z")

</div>

To run integration tests (not unit tests) you would probably prefer running that in something close to a production environment, like a real elasticsearch server instance. I shared some ideas about integration testing in this thread: [In memory testing with RestHighLevelClient](https://discuss.elastic.co/t/in-memory-testing-with-resthighlevelclient/106196/6)

Also this sample project shows how to use Elasticsearch Test Classes:

> **[joel-costigliola/elastic-search-test](https://github.com/joel-costigliola/elastic-search-test)**
>
> ESIntegTestCase example. Contribute to joel-costigliola/elastic-search-test development by creating an account on GitHub.

---

_[View the full topic](https://discuss.elastic.co/t/unit-test-case-for-the-high-level-rest-client/195253)._
