LongArray implements Array<Long> { @Override public int resize(int sizeHint) { return internalResize(sizeHint); } LongArray(int initialCapacity);  LongArray(); @Override synchronized Long get(int i); @Override int size(); @Override synchronized int capacity(); @Override Long set(int i, Long value); @Override synchronized int append(Long value); @Override synchronized Long remove(int i); @Override int resize(int sizeHint); @Override Iterator<Long> iterator();  }
@Test(groups = "fast") public void testResize() throws Exception { Assert.assertEquals(arraySize4.size(), 0); Assert.assertEquals(arraySize4.capacity(), 4); arraySize4.append(0L); arraySize4.append(1L); arraySize4.append(2L); arraySize4.append(4L); arraySize4.append(8L); Assert.assertEquals(arraySize4.size(), 5); Assert.assertEquals(arraySize4.capacity(), 12); Assert.assertEquals(arraySize4.get(0).longValue(), 0); Assert.assertEquals(arraySize4.get(1).longValue(), 1); Assert.assertEquals(arraySize4.get(2).longValue(), 2); Assert.assertEquals(arraySize4.get(3).longValue(), 4); Assert.assertEquals(arraySize4.get(4).longValue(), 8); }