class SystemPreferenceHandler extends AbstractContextualPreferenceHandler {

    @Override
    public Optional<ContextualPreference> search(final List<String> preferences,
                                                 final List<ContextualPreferenceExternalResource> resources) {
        final Optional<ContextualPreference> preference = preferences.stream()
                .map(this::loadPreference)
                .filter(Optional::isPresent)
                .map(Optional::get)
                .findFirst();
        return preference.isPresent()
                ? preference
                : searchUsingNextHandler(preferences, resources);
    }

    public  SystemPreferenceHandler(final PreferenceManager preferenceManager,
                                   final ContextualPreferenceHandler nextHandler);
    public  SystemPreferenceHandler(final PreferenceManager preferenceManager);

}