@Test
public void testTakeLastWithNegativeCount() {

    Observable<String> w = Observable.from("one");
    Observable<String> take = Observable.create(takeLast(w, -1));
    @SuppressWarnings("unchecked")
    Observer<String> observer = mock(Observer.class);
    take.subscribe(observer);
    verify(observer, never()).onNext("one");
    verify(observer, times(1)).onError(
            any(IndexOutOfBoundsException.class));
    verify(observer, never()).onCompleted();
}