ImmutableOpenMap<String,IndexMetaData> indices = loadedMetaData.indices();
assertThat(indices.size(), equalTo(latestMetaData.indices().size()));
for (IndexMetaData original : latestMetaData) {
IndexMetaData deserialized = indices.get(original.getIndex());
assertThat(deserialized, notNullValue());
assertThat(deserialized.version(), equalTo(original.version()));
assertThat(deserialized.numberOfReplicas(), equalTo(original.numberOfReplicas()));
assertThat(deserialized.numberOfShards(), equalTo(original.numberOfShards()));
}
// now corrupt all the latest ones and make sure we fail to load the state