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