DatastoreStorage implements Closeable { StyxConfig config() throws IOException { final Entity entity = asBuilderOrNew( getOpt(datastore, globalConfigKey(datastore.newKeyFactory())), globalConfigKey(datastore.newKeyFactory())) .build(); return entityToConfig(entity); } DatastoreStorage(CheckedDatastore datastore); @VisibleForTesting  DatastoreStorage(CheckedDatastore datastore,
                   Function<CheckedDatastoreTransaction, DatastoreStorageTransaction> storageTransactionFactory,
                   ExecutorService executor, Logger log); @Override void close(); void updateNextNaturalTrigger(WorkflowId workflowId, TriggerInstantSpec triggerSpec); Map<WorkflowId, Workflow> workflows(); Map<WorkflowId, Workflow> workflows(Set<WorkflowId> workflowIds); List<Workflow> workflows(String componentId); T runInTransactionWithRetries(TransactionFunction<T, E> f);  }
@Test public void testDefaultConfig() throws IOException { final StyxConfig expectedConfig = StyxConfig.newBuilder() .globalDockerRunnerId("default") .globalFlyteRunnerId("default") .globalEnabled(true) .debugEnabled(false) .build(); assertThat(storage.config(), is(expectedConfig)); }