Simple example of Spring Boot 2 + Groovy for creating REST service for elsticsearch and testing it with TestNG
It should be pretty enough to change properties in applications.properties file for default elasticsearch configuration elastic.search.host= elastic.search.port=
Test WILL DESTROY all your Elasticsearch indexes.