class ClientExperimentalFeaturesRegistryServiceImpl implements ClientExperimentalFeaturesRegistryService {

    @Override
    public void updateExperimentalFeature(String featureId, boolean enabled) {
        if (isExperimentalEnabled()) {

            Optional<ExperimentalFeature> optional = session.getFeaturesRegistry().getFeature(featureId);

            if (optional.isPresent()) {
                ExperimentalFeatureImpl feature = (ExperimentalFeatureImpl) optional.get();

                if (feature.isEnabled() != enabled) {

                    feature.setEnabled(enabled);

                    event.fire(new NonPortableExperimentalFeatureModifiedEvent(feature));
                }
            }
        }
    }

    @Inject public  ClientExperimentalFeaturesRegistryServiceImpl(Caller<BackendExperimentalFeaturesRegistryService> backendService, Event<NonPortableExperimentalFeatureModifiedEvent> event);

}