Map<Resource.Type, String> mapResourceIds = new HashMap<Resource.Type, String>();
mapResourceIds.put(Resource.Type.Cluster, "clusterName");
mapResourceIds.put(Resource.Type.Service, "serviceName");
mapResourceIds.put(Resource.Type.Component, null);
PredicateBuilder pb = new PredicateBuilder();
Predicate internalPredicate = pb.property("clusterId").equals("clusterName").and().
property("serviceId").equals("serviceName").toPredicate();
pb = new PredicateBuilder();
Predicate userPredicate = pb.property("foo").equals("bar").toPredicate();
// combine internal predicate and user predicate
//todo: for now, need to cast to BasePredicate
Predicate predicate = new AndPredicate((BasePredicate) internalPredicate, (BasePredicate) userPredicate);
// expectations