@Test
public void testTakeLast1() {

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