/**
* Tests copy constructor.
*/
@Test
public void testCopyConstructor() {
LongArrayList list = new LongArrayList(10);
list.add(0);
list.add(1);
list.add(2);
assertEquals(3, list.size());
assertEquals(0, list.get(0));
assertEquals(1, list.get(1));
assertEquals(2, list.get(2));
LongArrayList copy = new LongArrayList(list);
assertEquals(list.size(), copy.size());
assertEquals(list, copy);
}