### Question:
CompactableLongArrayList extends AbstractLongList implements RandomAccess, Serializable { @Override public void add(int index, long k) { ensureCanInsert(k); if (fullImpl != null) { fullImpl.add(index, k); } else { assert compactImpl != null; compactImpl.add(index, (int) k); } } CompactableLongArrayList();  CompactableLongArrayList(int initialCapacity);  CompactableLongArrayList(Collection<? extends Long> c); private  CompactableLongArrayList(IntArrayList items); void trim(); @Override int size(); @Override boolean isEmpty(); @Override long getLong(int i); @Override LongListIterator iterator(); @Override LongListIterator listIterator(); @Override LongListIterator listIterator(int index); @Override void add(int index, long k); @Override boolean add(long k); @Override boolean addAll(int index, Collection<? extends Long> c); @Override boolean addAll(Collection<? extends Long> c); @Override long set(int index, long k); @Override long removeLong(int index); @Override LongList subList(int from, int to);  }### Answer:
@Test public void testSerializeCompact() { CompactableLongArrayList list = new CompactableLongArrayList(); list.add(42); list.add(37); list.add(4); LongList copy = SerializationUtils.clone(list); assertThat(copy, contains(42L, 37L, 4L)); }
@Test public void testSerializeFull() { CompactableLongArrayList list = new CompactableLongArrayList(); list.add(42); list.add(37); list.add(Integer.MAX_VALUE + 7L); LongList copy = SerializationUtils.clone(list); assertThat(copy, contains(42L, 37L, Integer.MAX_VALUE + 7L)); }