@Test
public void testCheckChangeItemFail() throws Exception {

    when(mRepository.createOrUpdate(any(Todo.class)))
            .thenReturn(Observable.create((Observable.OnSubscribe<Todo>) subscriber -> {
                try {
                    throw new Exception("error");
                } catch (Exception ex) {
                    subscriber.onError(ex);
                }
            }));
    fetchData();
    mViewModel.checkChangeItem(mItemViewModelList.get(0)).subscribeOn(Schedulers.immediate())
            .subscribe(todo -> {
                fail("Should not success");
            }, throwable -> {
                assertEquals("error", throwable.getMessage());
            });
    assertFalse(mItemViewModelList.get(0).isCompleted());
}