//Actually "store" the stored prefs
this.targetPrefs = new LinkedHashMap<String, IPortletPreference>(this.storedPrefs);
assertEquals(1, this.storedPrefs.size());
IPortletPreference pref = this.storedPrefs.get("key");
assertNotNull(pref);
assertEquals("key", pref.getName());
assertArrayEquals(new String[] { "modified" }, pref.getValues());
assertFalse(pref.isReadOnly());
//Set a modified value
portletPreferences.setValues("key", null);
//Initial store, check that correct stored map is created
portletPreferences.store();
//Actually "store" the stored prefs
this.targetPrefs = new LinkedHashMap<String, IPortletPreference>(this.storedPrefs);
assertEquals(1, this.storedPrefs.size());
pref = this.storedPrefs.get("key");
assertNotNull(pref);
assertEquals("key", pref.getName());
assertArrayEquals(null, pref.getValues());
assertFalse(pref.isReadOnly());
}