### Question:
ArrayListOfLongsWritable extends ArrayListOfLongs implements
    WritableComparable<ArrayListOfLongsWritable> { @Override public String toString() { return toString(size()); } ArrayListOfLongsWritable();  ArrayListOfLongsWritable(int initialCapacity);  ArrayListOfLongsWritable(int first, int last);  ArrayListOfLongsWritable(ArrayListOfLongsWritable other);  ArrayListOfLongsWritable(long[] arr); void readFields(DataInput in); void write(DataOutput out); @Override String toString(); static ArrayListOfLongsWritable fromArrayListOfLongs(ArrayListOfLongs a); @Override int compareTo(ArrayListOfLongsWritable obj);  }### Answer:
@Test public void testToString() { assertEquals("[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", new ArrayListOfLongsWritable(1, 11).toString()); assertEquals("[1, 2, 3, 4, 5 ... (5 more) ]", new ArrayListOfLongsWritable(1, 11).toString(5)); assertEquals("[1, 2, 3, 4, 5]", new ArrayListOfLongsWritable(1, 6).toString()); assertEquals("[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]", new ArrayListOfLongsWritable(1, 12).toString()); assertEquals("[]", new ArrayListOfLongsWritable().toString()); }