@Test
public void testGetPreferencesForItem() throws TasteException {

   PreferenceArray prefs = new GenericUserPreferenceArray(2);
   long sampleUserID = 4;
	prefs.setUserID(0, sampleUserID);
   long sampleItemID = 11;
   prefs.setItemID(0, sampleItemID);
	prefs.setUserID(1, sampleUserID);
   long sampleItemID2 = 22;
   prefs.setItemID(1, sampleItemID2);
	FastByIDMap<PreferenceArray> delegatePreferences = new FastByIDMap<>();
	delegatePreferences.put(sampleUserID, prefs);
	PlusAnonymousConcurrentUserDataModel instance = getTestableWithDelegateData(10, delegatePreferences);
	Long anonymousUserID = instance.takeAvailableUser();
	PreferenceArray tempPrefs = new GenericUserPreferenceArray(2);
	tempPrefs.setUserID(0, anonymousUserID);
	tempPrefs.setItemID(0, sampleItemID);
	tempPrefs.setUserID(1, anonymousUserID);
   long sampleItemID3 = 33;
   tempPrefs.setItemID(1, sampleItemID3);
	instance.setTempPrefs(tempPrefs, anonymousUserID);
	assertEquals(sampleUserID, instance.getPreferencesForItem(sampleItemID).get(0).getUserID());
	assertEquals(2, instance.getPreferencesForItem(sampleItemID).length());
	assertEquals(1, instance.getPreferencesForItem(sampleItemID2).length());
	assertEquals(1, instance.getPreferencesForItem(sampleItemID3).length());
	assertEquals(2, instance.getNumUsersWithPreferenceFor(sampleItemID));
	assertEquals(1, instance.getNumUsersWithPreferenceFor(sampleItemID, sampleItemID2));
	assertEquals(1, instance.getNumUsersWithPreferenceFor(sampleItemID, sampleItemID3));
}