assertArrayEquals(new double[]{1, 1, 2, 1, 2, 3, 3, 4, 5}, notBackedByArray.toArray(), 0);
}
@Test
public void testAddAllNoBackingArray2() throws Exception {
DoubleBuffer buffer = ByteBuffer.allocateDirect(Double.SIZE / Byte.SIZE * 11).asDoubleBuffer();
buffer.position(1).limit(9);
BoundedDoubleArray notBackedByArray = BoundedDoubleArray.valueOf(buffer);
notBackedByArray.setAll(array);
notBackedByArray.addAll(DoubleArray.unsafeValueOf(5, 5));
assertEquals(10, notBackedByArray.length());
assertArrayEquals(new double[]{1, 1, 2, 1, 2, 3, 3, 4, 5, 5}, notBackedByArray.toArray(), 0);