Elasticsearch high level java client mock test

I am using a RestHighlevelclient in the Spring Boot environment.
I want to create a JUnit Test Code, but I can not find a way.
Is there no test method to officially provide?
I want to test the normal operation of basic queries. Is there no way?

To run integration tests (not unit tests) you should run an Elasticsearch node/cluster in something close to a production environment, like a real Elasticsearch server instance.

To do integration tests, you can for example:

For sure, integration tests must be run against a real Elasticsearch instance.
Unit tests should not require any third party tool to run IMHO.

For Unit Test, you could read what users have been sharing in this issue:

Hope this helps.

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