### Question:
Tuple7 extends Tuple6<T1, T2, T3, T4, T5, T6> implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); assertIndexInBounds(index); if (index == 6) { return item7; } else { return super.nth(index); } } Tuple7(T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); static Tuple7<T1, T2, T3, T4, T5, T6, T7> of(T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); T7 getItem7(); @Override Tuple7<T, T2, T3, T4, T5, T6, T7> mapItem1(Function<T1, T> mapper); @Override Tuple7<T1, T, T3, T4, T5, T6, T7> mapItem2(Function<T2, T> mapper); @Override Tuple7<T1, T2, T, T4, T5, T6, T7> mapItem3(Function<T3, T> mapper); @Override Tuple7<T1, T2, T3, T, T5, T6, T7> mapItem4(Function<T4, T> mapper); @Override Tuple7<T1, T2, T3, T4, T, T6, T7> mapItem5(Function<T5, T> mapper); @Override Tuple7<T1, T2, T3, T4, T5, T, T7> mapItem6(Function<T6, T> mapper); Tuple7<T1, T2, T3, T4, T5, T6, T> mapItem7(Function<T7, T> mapper); @Override Object nth(int index); @Override List<Object> asList(); @Override int size(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testAccessingNegative() { assertThrows(IndexOutOfBoundsException.class, () -> someTuple.nth(-1)); }
@Test public void testAccessingOutOfIndex() { assertThrows(IndexOutOfBoundsException.class, () -> someTuple.nth(10)); }
@Test public void testNth() { assertThat(someTuple.nth(0)).isEqualTo(1); assertThat(someTuple.nth(1)).isEqualTo(2); assertThat(someTuple.nth(2)).isEqualTo(3); assertThat(someTuple.nth(3)).isEqualTo(4); assertThat(someTuple.nth(4)).isEqualTo(5); assertThat(someTuple.nth(5)).isEqualTo(6); assertThat(someTuple.nth(6)).isEqualTo(7); assertThat(someTuple.getItem1()).isEqualTo(1); assertThat(someTuple.getItem2()).isEqualTo(2); assertThat(someTuple.getItem3()).isEqualTo(3); assertThat(someTuple.getItem4()).isEqualTo(4); assertThat(someTuple.getItem5()).isEqualTo(5); assertThat(someTuple.getItem6()).isEqualTo(6); assertThat(someTuple.getItem7()).isEqualTo(7); assertThat(someTuple.size()).isEqualTo(7); }