assertThat(health.timedOut(), equalTo(false));
assertThat(health.status(), equalTo(ClusterHealthStatus.GREEN));
stateResponse = client("node1").admin().cluster().prepareState().execute().actionGet();
assertThat(stateResponse.state().metaData().index("test").state(), equalTo(IndexMetaData.State.OPEN));
assertThat(stateResponse.state().routingTable().index("test").shards().size(), equalTo(2));
assertThat(stateResponse.state().routingTable().index("test").shardsWithState(ShardRoutingState.STARTED).size(), equalTo(4));
logger.info("--> trying to get the indexed document on the first index");
GetResponse getResponse = client("node1").prepareGet("test", "type1", "1").execute().actionGet();
assertThat(getResponse.exists(), equalTo(true));