# Not able connect with Rest High Level Client in ESIntegTestCase of ElasticSearch 7.0.0

**URL:** <https://discuss.elastic.co/t/not-able-connect-with-rest-high-level-client-in-esintegtestcase-of-elasticsearch-7-0-0/179307>\
**Category:** Elasticsearch\
**Created:** [May 2, 2019, 8:21am UTC](https://discuss.elastic.co/t/not-able-connect-with-rest-high-level-client-in-esintegtestcase-of-elasticsearch-7-0-0/179307 "2019-05-02T08:21:29Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [May 7, 2019, 5:28am UTC](https://discuss.elastic.co/t/not-able-connect-with-rest-high-level-client-in-esintegtestcase-of-elasticsearch-7-0-0/179307/4 "2019-05-07T05:28:41Z")

</div>

You can not run elasticsearch embedded. Read this [blog post](https://www.elastic.co/blog/elasticsearch-the-server).

Note that 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/not-able-connect-with-rest-high-level-client-in-esintegtestcase-of-elasticsearch-7-0-0/179307)._
