JUnit Rule for ElasticSearch by Florian Hopf.
From the post:
While I am using Solr a lot in my current engagement I recently started a pet project with ElasticSearch to learn more about it. Some of its functionality is rather different from Solr so there is quite some experimentation involved. I like to start small and implement tests if I like to find out how things work (see this post on how to write tests for Solr).
ElasticSearch internally uses TestNG and the test classes are not available in the distributed jar files. Fortunately it is really easy to start an ElasticSearch instance from within a test so it’s no problem to do something similar in JUnit. Felix Müller posted some useful code snippets on how to do this, obviously targeted at a Maven build. The ElasticSearch instance is started in a setUp method and stopped in a tearDown method:
Useful information about tests for Solr and ElasticSearch is too useful to pass up.
Besides, it reminded me of the need to have testable merging instances, both for TMDM merging as well as more complex merging scenarios.