Wanna write integration tests for elasticSearch service:
1. Index
2. Search
3. Check result
Each Java api method is executed asynchronously. How can I make it as simple sync api: call api.a, waiting for result, call api.b, waiting for result…
As @loteq mentioned, you can simply call
.actionGet()on aFutureto make it synchronous. Check elasticsearch integration tests, they have some very good examples.