UserExperimentalFeaturesStorageImpl extends AbstractScopedExperimentalFeaturesStorage { @Override public Collection<ExperimentalFeatureImpl> getFeatures() { return readFeatures(); } @Inject  UserExperimentalFeaturesStorageImpl(final SessionInfo sessionInfo, @Named("configIO") final IOService ioService, final ExperimentalFeatureDefRegistry defRegistry); @Override void init(FileSystem fileSystem); @Override Collection<ExperimentalFeatureImpl> getFeatures(); @Override String getStoragePath(); @Override ExperimentalStorageScope getScope(); static String encode(String folderName); static final String USER_FOLDER_ROOT; static final String USER_FOLDER; }
@Test public void testStoreFeature() throws IOException { testRegularLoad(); storage.store(new ExperimentalFeatureImpl(GLOBAL_FEATURE_1, true)); verify(ioService, never()).newOutputStream(any()); verify(ioService, never()).startBatch(fileSystem); verify(ioService, never()).endBatch(); storage.store(new ExperimentalFeatureImpl(FEATURE_1, false)); verify(ioService).newOutputStream(any()); verify(ioService).startBatch(fileSystem); verify(ioService).endBatch(); verifyLoadedFeatures(new ArrayList<>(storage.getFeatures()), new ExperimentalFeatureImpl(FEATURE_1, false), new ExperimentalFeatureImpl(FEATURE_2, false), new ExperimentalFeatureImpl(FEATURE_3, true)); }