Recently we have upgraded from Transport client to RestHighLevelClient, how to develop integration tests using RestHighLevelClient and embedded elastic search, since we want to test DAO layer as well.
Also please propose best solution which fits this scenario.
You can not run elasticsearch embedded. Read this blog post.
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
Also this sample project shows how to use Elasticsearch Test Classes:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.