@Test
void doDeletePermissionInvalidReference() {

	assertThat(storageMock.getAllExecutions()).isEmpty();
	final ManagedQuery managedQuery = createManagedQuery();
	// Removing the execution
	storageMock.removeExecution(managedQuery.getId());
	User user = new User("test", "test");
	storageMock.updateUser(user);
	user.addPermission(storageMock, QueryPermission.onInstance(AbilitySets.QUERY_CREATOR, managedQuery.getId()));
	
	QueryCleanupTask.deleteQueryPermissionsWithMissingRef(storageMock, storageMock.getAllUsers());
	
	assertThat(user.getPermissions()).isEmpty();
	
}