source: class OperationDistinctTest {
  
      @Mock Observer<String> w;
      @Mock Observer<String> w2;
      final Func1<String, String> TO_UPPER_WITH_EXCEPTION;
      final Comparator<String> COMPARE_LENGTH;
  
      @Test
      public void testDistinctOfNormalSourceWithComparator() {
  
target:         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));
      }
  
  }