DataDirsConfigImpl implements DataDirsConfig, ManageableServerComponent, StateDumpable { Optional<String> getPlatformRootIdentifier() { return Optional.ofNullable(platformRootIdentifier); } DataDirsConfigImpl(IParameterSubstitutor parameterSubstitutor, PathResolver pathResolver, Path metadataDir, Map<String, Path> dataDirectories);  DataDirsConfigImpl(IParameterSubstitutor parameterSubstitutor, PathResolver pathResolver, org.terracotta.data.config.DataDirectories dataDirectories);  DataDirsConfigImpl(IParameterSubstitutor parameterSubstitutor, PathResolver pathResolver, org.terracotta.data.config.DataDirectories dataDirectories, boolean skipIO); @Override DataDirs getDataDirectoriesForServer(PlatformConfiguration platformConfiguration); @Override void addDataDirectory(String name, String path); void addDataDirectory(String name, String path, boolean skipIO); @Override void validateDataDirectory(String name, String path); void validateDataDirectory(String name, String path, boolean skipIO); @Override void onManagementRegistryCreated(EntityManagementRegistry registry); @Override void onManagementRegistryClose(EntityManagementRegistry registry); @Override void addStateTo(StateDumpCollector dump); @Override void close(); long getDiskUsageByRootIdentifier(String identifier);  }
@Test public void testPlatformRootNotSpecified() throws Exception { DataDirsConfigImpl dataRootConfig = configureDataRoot(new String[]{"data"}, new String[1]); assertThat(dataRootConfig.getPlatformRootIdentifier(), is(Optional.empty())); }
@Test public void testPlatformRootSpecified() throws Exception { DataDirsConfigImpl dataRootConfig = configureDataRoot(new String[]{"data"}, new String[1], null, 0); assertThat(dataRootConfig.getPlatformRootIdentifier().orElse("busted"), is("data")); }