FastByIDMap<PreferenceArray> userData = new FastByIDMap<PreferenceArray>();
userData.put(123L, new GenericUserPreferenceArray(prefsOfUser123));
userData.put(456L, new GenericUserPreferenceArray(prefsOfUser456));
userData.put(789L, new GenericUserPreferenceArray(prefsOfUser789));
DataModel dataModel = new GenericDataModel(userData);
CandidateItemsStrategy strategy = new SamplingCandidateItemsStrategy(1, 1);
FastIDSet candidateItems = strategy.getCandidateItems(123L, dataModel);
/* result can be either item2 or item3 or empty */