@Test public void testSkipLastTimedCompleteBeforeTime() { 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); scheduler.advanceTimeBy(500, TimeUnit.MILLISECONDS); source.onCompleted(); InOrder inOrder = inOrder(o); inOrder.verify(o).onCompleted(); inOrder.verifyNoMoreInteractions(); verify(o, never()).onNext(any()); verify(o, never()).onError(any(Throwable.class)); }
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);  }