### Question:
Stack { public E remove(int index) { if (index >= mSize) { throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize); } E ret = mElements.remove(index < 0 ? index + mSize : index); mSize--; return ret; } Stack(); void push(E ele); E pop(); E peek(); E get(int index); E set(int index, E value); E remove(int index); int size(); boolean isEmpty(); void clear();  }### Answer:
@Test public void testIllegalRemove() throws Exception { Assertions.assertThrows(IndexOutOfBoundsException.class, () -> { Stack<String> stack = new Stack<String>(); stack.remove(1); }); }