assertAcked(prepareCreate("test").addMapping("type", "user", "type=string"));
ensureGreen();
logger.info("--> aliasing index [test] with [alias1] and filter [user:kimchy]");
FilterBuilder filter = termFilter("user", "kimchy");
assertAcked(admin().indices().prepareAliases().addAlias("test", "alias1", filter));
// For now just making sure that filter was stored with the alias
logger.info("--> making sure that filter was stored with alias [alias1] and filter [user:kimchy]");
ClusterState clusterState = admin().cluster().prepareState().get().getState();