    @Test
    public void uiShouldCallAction() throws Exception {

        final AtomicBoolean wasCalledOnUiThread = new AtomicBoolean(true);

        // WHEN have UI action
        Consumer<String> uiAction = spy(new Consumer<String>() {
            @Override
            public void accept(String s) {
                if (!wasCalledOnUiThread.compareAndSet(true, Looper.getMainLooper() == Looper.myLooper())) {
                    throw new IllegalStateException("Not on Main Thread!");
                }
            }
        });
        InOrder inOrder = inOrder(uiAction);

        // AND produce binder func
        Function<Observable<String>, Disposable> binderFunc = RxUi.ui(uiAction);

        // AND bind Observable via binder func
        binderFunc.apply(Observable.just("a", "b", "c"));

        // THEN action should be called with all values of source Observable on Main Thread
        inOrder.verify(uiAction).accept("a");
        inOrder.verify(uiAction).accept("b");
        inOrder.verify(uiAction).accept("c");
        inOrder.verifyNoMoreInteractions();
        assertThat(wasCalledOnUiThread.get()).isTrue();
    }