@Test
public void testDistinctUntilChangedOfSourceWithNulls() {

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