class HomeListPresenter implements HomeListContract.Presenter {

    @Override
    public void loadAllLists() {
        allLists = todoRepository.getAllLists();
        allLists.addChangeListener(new RealmChangeListener<RealmResults<TodoList>>() {
            @Override
            public void onChange(RealmResults<TodoList> element) {
                LogUtils.d("onChange: " + element.size());
                if (view != null) {
                    view.notifyDataChanged();
                }
            }
        });

        view.bindListData(allLists);
    }

}

class HomeListPresenterTest {

    @Mock HomeListContract.View view;
    @Mock TodoRepository repository;
    private HomeListPresenter presenter;

    @Ignore
    @Test
    public void shouldLoadDataFromRepoWhenLoadAllLists() throws Exception {

//        RealmResults mockResults = mock(RealmResults.class);
//        RealmResults<TodoList> todoLists = new RealmResults<TodoList>();
//        when(repository.getAllLists()).thenReturn(mockResults);
        // because the RealmResults can not be mocked or new, this test can't be run

        presenter.loadAllLists();

        verify(repository).getAllLists();
    }

}