InMemoryDataStorage implements DataStorage<R> { @Override public DataAndId<R> getCurrentData() { return new DataAndId<>(storage.get(currentFactoryId).root.utility().copy(),currentFactoryId); } InMemoryDataStorage(R initialFactory); @Override R getHistoryData(String id); @Override Collection<StoredDataMetadata> getHistoryDataList(); @Override DataAndId<R> getCurrentData(); @Override void updateCurrentData(DataUpdate<R> update, UpdateSummary changeSummary); @Override void patchAll(DataStoragePatcher consumer); @Override void patchCurrentData(DataStoragePatcher consumer); @Override Collection<ScheduledUpdateMetadata> getFutureDataList(); @Override void deleteFutureData(String id); R getFutureData(String id); @Override void addFutureData(ScheduledUpdate<R> futureFactory);  }
@Test public void test_init() { Dummy dummy = new Dummy(); InMemoryDataStorage<Dummy> fileSystemFactoryStorage = new InMemoryDataStorage<>(dummy); Assertions.assertNotNull(fileSystemFactoryStorage.getCurrentData()); }