### Question:
LongList { public long get(int i) { if (i >= size) { throw new IndexOutOfBoundsException(); } return longs[i]; } LongList();  LongList(int initialCapacity); static LongList of(long... values); void add(long l); void addAll(LongList other); int getSize(); long get(int i); boolean contains(long l); boolean remove(long l); long remove(int i); void clear(); @Override String toString(); long[] toArray(); boolean isEmpty();  }### Answer:
@Test void testOutOfBounds() { assertThatThrownBy(() -> longList.get(0)).isInstanceOf(IndexOutOfBoundsException.class); }