@Test
public void testDeleteResources() throws SystemException, UnsupportedPropertyException,
                                         NoSuchParentResourceException, NoSuchResourceException {

  BlueprintEntity blueprintEntity = createEntity(getBlueprintTestProperties().iterator().next());
  // set expectations
  expect(dao.findByName(BLUEPRINT_NAME)).andReturn(blueprintEntity);
  dao.removeByName(blueprintEntity.getBlueprintName());
  expectLastCall();
  replay(dao);
  Predicate predicate = new EqualsPredicate<String>(
      BlueprintResourceProvider.BLUEPRINT_NAME_PROPERTY_ID, BLUEPRINT_NAME);
  AbstractResourceProviderTest.TestObserver observer = new AbstractResourceProviderTest.TestObserver();
  provider.addObserver(observer);
  provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
  ResourceProviderEvent lastEvent = observer.getLastEvent();
  assertNotNull(lastEvent);
  assertEquals(Resource.Type.Blueprint, lastEvent.getResourceType());
  assertEquals(ResourceProviderEvent.Type.Delete, lastEvent.getType());
  assertNotNull(lastEvent.getPredicate());
  verify(dao);
}