@Test
public void testDistinctOfNormalSourceWithComparator() {

    Observable<String> src = Observable.from("1", "12", "123", "aaa", "321", "12", "21", "1", "12345");
    Observable.create(distinct(src, COMPARE_LENGTH)).subscribe(w);
    InOrder inOrder = inOrder(w);
    inOrder.verify(w, times(1)).onNext("1");
    inOrder.verify(w, times(1)).onNext("12");
    inOrder.verify(w, times(1)).onNext("123");
    inOrder.verify(w, times(1)).onNext("12345");
    inOrder.verify(w, times(1)).onCompleted();
    inOrder.verify(w, never()).onNext(anyString());
    verify(w, never()).onError(any(Throwable.class));
}