public void removeResourceWithDataAccessException() throws NoPermissionException {
Resource resource = getDefaultResource();
policyService.checkPermission(resourceType, PolicyConstants.PERM_DELETE, (SessionInfo) null);
resourceDatabase.removeResource(resource.getResourceId());
expectLastCall().andThrow(new DataAccessException("Failed to remove resource."));
CoreEvent deleteEvent = getDeleteEvent(resourceService.getRemoveEventId(), CoreEvent.STATE_UNSUCCESSFUL);
coreEventService.fireCoreEvent(eqCoreEvent(deleteEvent));
mocksControl.replay();
try {