### Question:
ObservableBuffer extends ObservableListBase<E> implements Queue<E> { @Override public E get(final int index) { if (index < 0 || index >= myQueue.size()) { throw new IndexOutOfBoundsException(0); } E item = null; synchronized (myQueue) { final Iterator<E> iterator = myQueue.iterator(); for (int i = 0; i < index; i++) { iterator.next(); } item = iterator.next(); } return item; } ObservableBuffer(final int capacity); @Override boolean offer(final E element); @Override boolean add(final E e); @Override E remove(); @Override E poll(); @Override E element(); @Override E peek(); @Override E get(final int index); @Override int size(); @Override void clear();  }### Answer:
@Test(expected = IndexOutOfBoundsException.class) public void testGetIntNegative() { myObservableBuffer.get(-1); }
@Test(expected = IndexOutOfBoundsException.class) public void testGetIntZeroEmpty() { myObservableBuffer.get(0); }