@Test
public void testDistinctUntilChangedOfNormalSourceWithKeySelector() {

    Observable<String> src = Observable.from("a", "b", "c", "C", "c", "B", "b", "a", "e");
    Observable.create(distinctUntilChanged(src, TO_UPPER_WITH_EXCEPTION)).subscribe(w);
    InOrder inOrder = inOrder(w);
    inOrder.verify(w, times(1)).onNext("a");
    inOrder.verify(w, times(1)).onNext("b");
    inOrder.verify(w, times(1)).onNext("c");
    inOrder.verify(w, times(1)).onNext("B");
    inOrder.verify(w, times(1)).onNext("a");
    inOrder.verify(w, times(1)).onNext("e");
    inOrder.verify(w, times(1)).onCompleted();
    inOrder.verify(w, never()).onNext(anyString());
    verify(w, never()).onError(any(Throwable.class));
}