DFSConfigWithStorageCreds extends DefaultDFSConfig { @Override public CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id) { CreateUserPrivateProfile base = super.defaultPrivateTemplate(id); Uri rootLocation = userRoot(id.getUserID()); Uri storageCredsUri = rootLocation.resolve(PRIVATE_COMPONENT + "/storagekeystore"); return base.toBuilder().storageCredentialsKeystore(accessPrivate(storageCredsUri)).build(); } DFSConfigWithStorageCreds(Uri systemRoot, ReadStorePassword systemPassword,
                                     UserProfileLocation userProfileLocation);  DFSConfigWithStorageCreds(String systemRoot, ReadStorePassword systemPassword);  DFSConfigWithStorageCreds(URI systemRoot, ReadStorePassword systemPassword);  DFSConfigWithStorageCreds(Uri systemRoot, ReadStorePassword systemPassword);  DFSConfigWithStorageCreds(URI systemRoot, Supplier<char[]> systemPassword);  DFSConfigWithStorageCreds(String systemRoot, Supplier<char[]> systemPassword); @Override CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id);  }
@Test void defaultPrivateTemplate() { UserIDAuth user = new UserIDAuth("", ReadKeyPasswordTestFactory.getForString("")); CreateUserPrivateProfile profile = tested.defaultPrivateTemplate(user); assertThat(profile.getId()).isEqualTo(user); assertThat(profile.getAppVersion()).isEqualTo(Version.current()); assertThat(profile.getPrivateStorage().location().asString()).isEqualTo("file: assertThat(profile.getKeystore().location().asString()).isEqualTo("file: assertThat(profile.getStorageCredentialsKeystore().location().asString()) .isEqualTo("file: assertThat(profile.getPublishPubKeysTo().location().asString()).isEqualTo("file: assertThat(profile.getInboxWithWriteAccess().location().asString()).isEqualTo("file: }