PreferenceStorageImpl implements PreferenceStorage { @Override public <T> T read(final PreferenceScope preferenceScope, final String key) { final String path = buildScopedPreferencePath(preferenceScope, key); return objectStorage.read(path); } protected  PreferenceStorageImpl(); @Inject  PreferenceStorageImpl(@Named("ioStrategy") final IOService ioService,
                                 final SessionInfo sessionInfo,
                                 @Customizable final PreferenceScopeTypes scopeTypes,
                                 final PreferenceScopeFactory scopeFactory,
                                 final ObjectStorage objectStorage,
                                 final SpacesAPI spaces,
                                 final Event<PreferenceUpdatedEvent> preferenceUpdatedEvent); @PostConstruct void init(); @Override boolean exists(final PreferenceScope preferenceScope,
                          final String key); @Override boolean exists(final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo,
                          final String key); @Override T read(final PreferenceScope preferenceScope,
                      final String key); @Override T read(final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo,
                      final String key); @Override PreferenceScopedValue<T> readWithScope(final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo,
                                                      final String key); @Override void write(final PreferenceScope preferenceScope,
                      final String key,
                      final Object value); @Override void delete(final PreferenceScope preferenceScope,
                       final String key); @Override Collection<String> allKeys(final PreferenceScope scope); @Override Collection<String> allKeys(final List<PreferenceScope> scopes); static final String FILE_FORMAT; static final int FILE_FORMAT_SIZE; }
@Test public void readNonexistentPreferenceFromSpecificScopeTest() { final PreferenceScope scope = userEntireApplicationScope; final String value = preferenceStorageServiceBackendImpl.read(scope, "my.nonexistent.preference.key"); assertNull(value); }
@Test public void readNonexistentPreferenceWithResolutionStrategyTest() { final String value = preferenceStorageServiceBackendImpl.read(scopeResolutionStrategyInfo, "my.nonexistent.preference.key"); assertNull(value); }