FeatureConfigurationFacadeEjb implements FeatureConfigurationFacade { @Override public boolean isTaskGenerationFeatureEnabled(TaskType taskType) { for (TaskContext context : taskType.getTaskContexts()) { if (isFeatureEnabled(context.getFeatureType())) { return true; } } return false; }  @Override List<FeatureConfigurationDto> getAllAfter(Date date); @Override List<FeatureConfigurationDto> getByUuids(List<String> uuids); @Override List<String> getAllUuids(); @Override List<String> getDeletedUuids(Date since); @Override List<FeatureConfigurationIndexDto> getFeatureConfigurations(FeatureConfigurationCriteria criteria, boolean includeInactive); @Override void saveFeatureConfigurations(Collection<FeatureConfigurationIndexDto> configurations, FeatureType featureType); @Override void saveFeatureConfiguration(FeatureConfigurationIndexDto configuration, FeatureType featureType); @Override void deleteAllFeatureConfigurations(FeatureConfigurationCriteria criteria); @Override @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) void deleteAllExpiredFeatureConfigurations(Date date); @Override boolean isFeatureDisabled(FeatureType featureType); @Override boolean isFeatureEnabled(FeatureType featureType); @Override boolean isTaskGenerationFeatureEnabled(TaskType taskType); @Override List<FeatureType> getActiveServerFeatureTypes(); static FeatureConfigurationDto toDto(FeatureConfiguration source); FeatureConfiguration fromDto(@NotNull FeatureConfigurationDto source);  }
@Test public void testIsTaskGenerationFeatureEnabled() { FeatureConfigurationIndexDto featureConfiguration = new FeatureConfigurationIndexDto(DataHelper.createUuid(), null, null, null, null, null, false, null); getFeatureConfigurationFacade().saveFeatureConfiguration(featureConfiguration, FeatureType.TASK_GENERATION_CASE_SURVEILLANCE); RDCFEntities rdcf = creator.createRDCFEntities(); UserReferenceDto user = creator.createUser(rdcf, UserRole.SURVEILLANCE_SUPERVISOR).toReference(); PersonReferenceDto person = creator.createPerson("Case", "Person").toReference(); CaseDataDto caze = creator.createCase(user, person, rdcf); List<TaskDto> caseTasks = getTaskFacade().getAllPendingByCase(caze.toReference()); assertEquals(0, caseTasks.size()); }