### Question:
Tuple3 extends Tuple2<T1, T2> implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); if (index == 2) { return item3; } else { return super.nth(index); } } Tuple3(T1 a, T2 b, T3 c); static Tuple3<T1, T2, T3> of(T1 a, T2 b, T3 c); T3 getItem3(); @Override Object nth(int index); @Override Tuple3<T, T2, T3> mapItem1(Function<T1, T> mapper); @Override Tuple3<T1, T, T3> mapItem2(Function<T2, T> mapper); Tuple3<T1, T2, T> mapItem3(Function<T3, T> mapper); @Override List<Object> asList(); @Override int size(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }### Answer:
@Test public void testAccessingNegative() { assertThrows(IndexOutOfBoundsException.class, () -> someTuple.nth(-1)); }
@Test public void testAccessingOutOfIndex() { assertThrows(IndexOutOfBoundsException.class, () -> someTuple.nth(4)); }
@Test public void testNth() { assertThat(someTuple.nth(0)).isEqualTo(1); assertThat(someTuple.nth(1)).isEqualTo(2); assertThat(someTuple.nth(2)).isEqualTo(3); assertThat(someTuple.getItem1()).isEqualTo(1); assertThat(someTuple.getItem2()).isEqualTo(2); assertThat(someTuple.getItem3()).isEqualTo(3); assertThat(someTuple.size()).isEqualTo(3); }