ExperimentalFeaturesEditorScreen implements ExperimentalFeaturesEditorScreenView.Presenter { protected void doSave(final EditableExperimentalFeature feature) { editorService.call((RemoteCallback<Void>) aVoid -> registryService.updateExperimentalFeature(feature.getFeatureId(), feature.isEnabled())).save(feature); } @Inject  ExperimentalFeaturesEditorScreen(final TranslationService translationService,
                                            final ClientExperimentalFeaturesRegistryService registryService,
                                            final ExperimentalFeatureDefRegistry defRegistry,
                                            final ExperimentalFeaturesEditorScreenView view,
                                            final ManagedInstance<ExperimentalFeaturesGroup> groupsInstance,
                                            final Caller<FeaturesEditorService> editorService,
                                            final SessionInfo sessionInfo,
                                            final AuthorizationManager authorizationManager); @PostConstruct void init(); @OnOpen void show(); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView ExperimentalFeaturesEditorScreenView getView(); @PreDestroy void clear(); static final String SCREEN_ID; }
@Test public void testModificationCallback() { EditableExperimentalFeature feature = new EditableExperimentalFeature(FEATURE_1, true); presenter.doSave(feature); verify(featuresEditorService).save(feature); verify(registryService).updateExperimentalFeature(feature.getFeatureId(), feature.isEnabled()); }