public final class SamplingCandidateItemsStrategyTest extends TasteTestCase {
@Test
public void testStrategy() throws TasteException {
List<Preference> prefsOfUser123 = Lists.newArrayList();
prefsOfUser123.add(new GenericPreference(123L, 1L, 1.0f));
List<Preference> prefsOfUser456 = Lists.newArrayList();
prefsOfUser456.add(new GenericPreference(456L, 1L, 1.0f));
prefsOfUser456.add(new GenericPreference(456L, 2L, 1.0f));
List<Preference> prefsOfUser789 = Lists.newArrayList();
prefsOfUser789.add(new GenericPreference(789L, 1L, 0.5f));
prefsOfUser789.add(new GenericPreference(789L, 3L, 1.0f));
PreferenceArray prefArrayOfUser123 = new GenericUserPreferenceArray(prefsOfUser123);
FastByIDMap<PreferenceArray> userData = new FastByIDMap<PreferenceArray>();
userData.put(123L, prefArrayOfUser123);