### Question:
ValidatingArgumentSet implements ArgumentSet { @Override public String get(int index) { if (index < 0 || index >= length()) { throw new IndexOutOfBoundsException("Out of bounds: " + index); } return argumentSet.get(index); } ValidatingArgumentSet(ArgumentSet argumentSet); @Override String get(int index); @Override int length(); @Override List<String> getAll(); @Override boolean isEmpty(); @Override boolean has(String argument); @Override String join(); @Override String[] toArray();  }### Answer:
@Test(expected = IndexOutOfBoundsException.class) public void whenNegativeIndex() { validatingArguments.get(-1); }
@Test public void get() { when(delegate.length()).thenReturn(5); validatingArguments.get(3); verify(delegate).get(eq(3)); }