# Junit test for High level rest client query

**URL:** https://discuss.elastic.co/t/junit-test-for-high-level-rest-client-query/291099
**Category:** Elasticsearch
**Tags:** language-clients
**Created:** [December 7, 2021, 7:58am UTC](https://discuss.elastic.co/t/junit-test-for-high-level-rest-client-query/291099 "2021-12-07T07:58:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![111505](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111505/32/94191_2.png) [@111505](https://discuss.elastic.co/u/111505)
#### Post date: [December 7, 2021, 7:58am UTC](https://discuss.elastic.co/t/junit-test-for-high-level-rest-client-query/291099/1 "2021-12-07T07:58:56Z")

</div>

Hello.  
I want to test Elasticsearch query in java Junit.  
It seems to be possible to use a test container, but the Elasticsearch documentation does not seem to provide it officially.  
doc: `https://www.elastic.co/guide/en/elasticsearch/reference/current/testing.html`

Questions.

1. Is it okay to use a test container for Junit test?
2. Why is the Elasticsearch test container not officially provided?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 4, 2022, 7:59am UTC](https://discuss.elastic.co/t/junit-test-for-high-level-rest-client-query/291099/2 "2022-01-04T07:59:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
