class TodoRepositoryImpl implements TodoRepository {

    @Override
    public Observable<Boolean> delete(Long id) {
        return Observable.create(new Observable.OnSubscribe<Boolean>() {
            @Override
            public void call(Subscriber<? super Boolean> subscriber) {
                try {
                    Todo todo = Todo.findById(Todo.class, id);
                    if (todo == null) throw new Exception(mContext.getString(R.string.problem_find));
                    if (!todo.delete()) throw new Exception(mContext.getString(R.string.problem_delete));
                    subscriber.onNext(true);
                    subscriber.onCompleted();
                } catch (Exception ex) {
                    subscriber.onError(ex);
                }
            }
        });
    }

    public  TodoRepositoryImpl(Context context);

}