@Test
public void testDeleteNotFound() throws Exception {

    PowerMockito.when(Todo.findById(Todo.class, 1L)).thenReturn(null);
    mTodoRepository.delete(1L).observeOn(Schedulers.immediate()).subscribe(newTodo -> {
        fail("Should throw exception");
    }, throwable -> {
        assertEquals("Can not find todo", throwable.getMessage());
    });
}