@Test
@Transactional
public void testDeleteIdentityWithoutModuleIsEnabled() {

	try {
		getHelper().loginAdmin();
		getHelper().disableModule(ExampleModuleDescriptor.MODULE_ID);
		
		IdmIdentityDto identity = getHelper().createIdentity((GuardedString) null);
		
		IdmBulkActionDto bulkAction = this.findBulkAction(IdmIdentity.class, IdentityDeleteBulkAction.NAME);
		Set<UUID> ids = Sets.newHashSet(identity.getId());
		bulkAction.setIdentifiers(ids);
		bulkActionManager.processAction(bulkAction);
		
		for (UUID id : ids) {
			IdmIdentityDto identityDto = getHelper().getService(IdmIdentityService.class).get(id);
			Assert.assertNull(identityDto);
		}
	} finally {
		getHelper().enableModule(ExampleModuleDescriptor.MODULE_ID);
		getHelper().logout();
	}
}