### Question:
ArrayDouble extends ListDouble implements Serializable { @Override public void setDouble(int index, double value) { if (!readOnly) { array[index] = value; } else { throw new UnsupportedOperationException("Read only list."); } } ArrayDouble(double... array);  ArrayDouble(double[] array, boolean readOnly); @Override final IteratorDouble iterator(); @Override final int size(); @Override double getDouble(int index); @Override void setDouble(int index, double value); @Override boolean equals(Object obj);  }### Answer:
@Test(expected=UnsupportedOperationException.class) public void wrap2() { ArrayDouble array = new ArrayDouble(0, 1, 2, 3, 4, 5); array.setDouble(0, 0); }
@Test public void wrap3() { ArrayDouble array = new ArrayDouble(new double[] {0, 1, 2, 3, 4, 5}, false); array.setDouble(0, 5); array.setDouble(5, 0); assertThat(CollectionNumbers.doubleArrayCopyOf(array), equalTo(new double[] {5, 1, 2, 3, 4, 0})); }