IdentityLogExampleBulkAction extends AbstractBulkAction<IdmIdentityDto, IdmIdentityFilter> { @Override public ReadWriteDtoService<IdmIdentityDto, IdmIdentityFilter> getService() { return identityService; }  @Override String getName(); @Override List<IdmFormAttributeDto> getFormAttributes(); @Override int getOrder(); @Override NotificationLevel getLevel(); @Override ReadWriteDtoService<IdmIdentityDto, IdmIdentityFilter> getService(); @Override boolean isRecoverable(); static final String BULK_ACTION_NAME; }
@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(); } }