@Test
public void testDeleteResources() throws Exception{

  TestProviderModule providerModule = new TestProviderModule();
  TestHostResourceProvider resourceProvider = (TestHostResourceProvider) providerModule.getResourceProvider(Resource.Type.Host);
  ClusterController controller = new ClusterControllerImpl(providerModule);
  Predicate predicate = new PredicateBuilder().property("c1/p2").equals(1).toPredicate();
  controller.deleteResources(Resource.Type.Host, new RequestImpl(null, null, null, null), predicate);
  Assert.assertEquals(TestHostResourceProvider.Action.Delete, resourceProvider.getLastAction());
  Assert.assertNull(resourceProvider.getLastRequest());
  Assert.assertSame(predicate, resourceProvider.getLastPredicate());
}