LongArray implements Array<Long> { @Override public synchronized Long remove(int i) throws ArrayIndexOutOfBoundsException { if (isEmpty(i)) { return null; } else { Long previousValue = data[i]; data[i] = EMPTY; size--; return convertValue(previousValue); } } 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 testRemove() throws Exception { array.remove(3); Assert.assertNull(array.get(3)); Assert.assertEquals(array.size(), 5); assertArrayIs(array, 1, 2, 3, 5, 6); }