AbstractResourceProviderTest.TestObserver observer = new AbstractResourceProviderTest.TestObserver();
((ObservableResourceProvider)provider).addObserver(observer);
// delete the cluster named Cluster102
Predicate predicate = new PredicateBuilder().property(
ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID).equals("Cluster102").toPredicate();
provider.deleteResources(predicate);
// delete the cluster where id == 103
predicate = new PredicateBuilder().property(
ClusterResourceProvider.CLUSTER_ID_PROPERTY_ID).equals(103L).toPredicate();
provider.deleteResources(predicate);
ResourceProviderEvent lastEvent = observer.getLastEvent();
Assert.assertNotNull(lastEvent);