SearchResponse nullResponse = client.prepareSearch("test").setQuery(QueryBuilders.termQuery("allow_token_share","__nosecurity__")).execute().actionGet();
verifyResponse(nullResponse, "da12", "da13-dd3", "notoken");
ConfigurationParameters cp = new ConfigurationParameters();
MCFAuthorizer mcfa = new MCFAuthorizer(cp);
FilterBuilder user1Filter = mcfa.buildAuthorizationFilter("user1");
FilterBuilder user2Filter = mcfa.buildAuthorizationFilter("user2");
FilterBuilder user3Filter = mcfa.buildAuthorizationFilter("user3");
FilterBuilder user4Filter = mcfa.buildAuthorizationFilter("user4");
// Ok, check the filters I built.
SearchResponse user1Response = client.prepareSearch("test").setQuery(QueryBuilders.matchAllQuery()).setFilter(user1Filter).execute().actionGet();
verifyResponse(user1Response, "da12", "da13-dd3", "notoken");
SearchResponse user2Response = client.prepareSearch("test").setQuery(QueryBuilders.matchAllQuery()).setFilter(user2Filter).execute().actionGet();