}
@Test
public void testAddAllNoBackingArray2() throws Exception {
LongBuffer buffer = ByteBuffer.allocateDirect(Long.SIZE / Byte.SIZE * 11).asLongBuffer();
buffer.position(1).limit(9);
BoundedLongArray notBackedByArray = BoundedLongArray.valueOf(buffer);
notBackedByArray.setAll(array);
notBackedByArray.addAll(LongArray.unsafeValueOf((long) 5, (long) 5));
assertEquals(10, notBackedByArray.length());
assertArrayEquals(new long[]{1, 1, 2, 1, 2, 3, 3, 4, 5, 5}, notBackedByArray.toArray());