@Test
public void testElementAtOrDefaultWithMinusIndex() {

    Observable<Integer> w = Observable.from(1, 2);
    Observable<Integer> observable = Observable
            .create(elementAtOrDefault(w, -1, 0));
    try {
        Iterator<Integer> iter = OperationToIterator
                .toIterator(observable);
        assertTrue(iter.hasNext());
        iter.next();
        fail("expect an IndexOutOfBoundsException when index is out of bounds");
    } catch (IndexOutOfBoundsException e) {
    }
}