BooleanUserPreferenceArray implements PreferenceArray { @Override public void setValue(int i, float value) { throw new UnsupportedOperationException(); } BooleanUserPreferenceArray(int size);  BooleanUserPreferenceArray(List<? extends Preference> prefs); private  BooleanUserPreferenceArray(long[] ids, long id); @Override int length(); @Override Preference get(int i); @Override void set(int i, Preference pref); @Override long getUserID(int i); @Override void setUserID(int i, long userID); @Override long getItemID(int i); @Override void setItemID(int i, long itemID); @Override long[] getIDs(); @Override float getValue(int i); @Override void setValue(int i, float value); @Override void sortByUser(); @Override void sortByItem(); @Override void sortByValue(); @Override void sortByValueReversed(); @Override boolean hasPrefWithUserID(long userID); @Override boolean hasPrefWithItemID(long itemID); @Override BooleanUserPreferenceArray clone(); @Override int hashCode(); @Override boolean equals(Object other); @Override Iterator<Preference> iterator(); @Override String toString();  }
@Test(expected = UnsupportedOperationException.class) public void testSetValue() { PreferenceArray prefs = new BooleanUserPreferenceArray(3); assertEquals(1.0f, prefs.getValue(2), EPSILON); assertEquals(3, prefs.length()); prefs.setValue(0, 1.0f); }