@Test public void testSkipLastTimedErrorBeforeTime() { TestScheduler scheduler = new TestScheduler(); PublishSubject<Integer> source = PublishSubject.create(); Observable<Integer> result = source.skipLast(1, TimeUnit.SECONDS, scheduler); Observer<Object> o = mock(Observer.class); result.subscribe(o); source.onNext(1); source.onNext(2); source.onNext(3); source.onError(new OperationSkipTest.CustomException()); scheduler.advanceTimeBy(1050, TimeUnit.MILLISECONDS); verify(o).onError(any(CustomException.class)); verify(o, never()).onCompleted(); verify(o, never()).onNext(any()); }
public static <T> OnSubscribeFunc<T> skipLast( Observable<? extends T> source, int count) { return new SkipLast<T>(source, count); }
OperationSkipLast { public static <T> OnSubscribeFunc<T> skipLast( Observable<? extends T> source, int count) { return new SkipLast<T>(source, count); } }
OperationSkipLast { public static <T> OnSubscribeFunc<T> skipLast( Observable<? extends T> source, int count) { return new SkipLast<T>(source, count); }  }
OperationSkipLast { public static <T> OnSubscribeFunc<T> skipLast( Observable<? extends T> source, int count) { return new SkipLast<T>(source, count); }  static OnSubscribeFunc<T> skipLast(
            Observable<? extends T> source, int count); }
OperationSkipLast { public static <T> OnSubscribeFunc<T> skipLast( Observable<? extends T> source, int count) { return new SkipLast<T>(source, count); }  static OnSubscribeFunc<T> skipLast(
            Observable<? extends T> source, int count);  }