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