assertArrayEquals(new short[]{1, 1, 2, 1, 2, 3, 3, 4, 5}, notBackedByArray.toArray());
}
@Test
public void testAddAllNoBackingArray2() throws Exception {
ShortBuffer buffer = ByteBuffer.allocateDirect(Short.SIZE / Byte.SIZE * 11).asShortBuffer();
buffer.position(1).limit(9);
BoundedShortArray notBackedByArray = BoundedShortArray.valueOf(buffer);
notBackedByArray.setAll(array);
notBackedByArray.addAll(ShortArray.unsafeValueOf((short) 5, (short) 5));
assertEquals(10, notBackedByArray.length());
assertArrayEquals(new short[]{1, 1, 2, 1, 2, 3, 3, 4, 5, 5}, notBackedByArray.toArray());