for (int i = 0; i < numberOfRelocations; i++) {
String fromNode = (i % 2 == 0) ? node1 : node2;
String toNode = node1.equals(fromNode) ? node2 : node1;
logger.trace("--> START relocate the shard from {} to {}", fromNode, toNode);
cluster().client(node1).admin().cluster().prepareReroute()
.add(new MoveAllocationCommand(new ShardId(BlobIndices.fullIndexName("test"), 0), fromNode, toNode))
.execute().actionGet();
ClusterHealthResponse clusterHealthResponse = cluster().client(node1).admin().cluster()
.prepareHealth()
.setWaitForEvents(Priority.LANGUID)
.setWaitForRelocatingShards(0)