test_class.declarator: mTodoRepository
test_class.modifier: private
test_class.original_string: private TodoRepositoryImpl mTodoRepository;
test_class.type: TodoRepositoryImpl
test_class.var_name: mTodoRepository
test_class.declarator: rule = new PowerMockRule()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public PowerMockRule rule = new PowerMockRule();
test_class.type: PowerMockRule
test_class.var_name: rule
test_class.file: app/src/test/java/apidez/com/doit/repository/TodoRepositoryImplTest.java
test_class.identifier: TodoRepositoryImplTest
test_case.body: @Test
      public void testCreateOrUpdateSuccess() throws Exception {
          Todo todo = Mockito.mock(Todo.class);
          when(todo.save()).thenReturn(1L);
          assertSame(todo, mTodoRepository.createOrUpdate(todo).toBlocking().single());
      }
test_case.class_method_signature: TodoRepositoryImplTest.testCreateOrUpdateSuccess()
test_case.full_signature: @Test public void testCreateOrUpdateSuccess()
test_case.identifier: testCreateOrUpdateSuccess
test_case.invocations: mock thenReturn when save assertSame single toBlocking createOrUpdate
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateOrUpdateSuccess()
focal_class.declarator: mContext
focal_class.modifier: private
focal_class.original_string: private Context mContext;
focal_class.type: Context
focal_class.var_name: mContext
focal_class.file: app/src/main/java/apidez/com/doit/repository/TodoRepositoryImpl.java
focal_class.identifier: TodoRepositoryImpl
focal_class.interfaces: implements TodoRepository
focal_class.class_method_signature: TodoRepositoryImpl.TodoRepositoryImpl(Context context)
focal_class.full_signature: public  TodoRepositoryImpl(Context context)
focal_class.identifier: TodoRepositoryImpl
focal_class.modifiers: public
focal_class.parameters: (Context context)
focal_class.signature:  TodoRepositoryImpl(Context context)
focal_class.class_method_signature: TodoRepositoryImpl.createOrUpdate(Todo todo)
focal_class.full_signature: @Override public Observable<Todo> createOrUpdate(Todo todo)
focal_class.identifier: createOrUpdate
focal_class.modifiers: @Override public
focal_class.parameters: (Todo todo)
focal_class.return: Observable<Todo>
focal_class.signature: Observable<Todo> createOrUpdate(Todo todo)
focal_class.class_method_signature: TodoRepositoryImpl.delete(Long id)
focal_class.full_signature: @Override public Observable<Boolean> delete(Long id)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (Long id)
focal_class.return: Observable<Boolean>
focal_class.signature: Observable<Boolean> delete(Long id)
focal_class.class_method_signature: TodoRepositoryImpl.getAll()
focal_class.full_signature: @Override public Observable<List<Todo>> getAll()
focal_class.identifier: getAll
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Observable<List<Todo>>
focal_class.signature: Observable<List<Todo>> getAll()
focal_method.body: @Override
      public Observable<Todo> createOrUpdate(Todo todo) {
          return Observable.create(new Observable.OnSubscribe<Todo>() {
              @Override
              public void call(Subscriber<? super Todo> subscriber) {
                  try {
                      long id = todo.save();
                      if (id == -1L) throw new Exception(mContext.getString(R.string.problem_save));
                      subscriber.onNext(todo);
                      subscriber.onCompleted();
                  } catch (Exception ex) {
                      subscriber.onError(ex);
                  }
              }
          });
      }
focal_method.class_method_signature: TodoRepositoryImpl.createOrUpdate(Todo todo)
focal_method.full_signature: @Override public Observable<Todo> createOrUpdate(Todo todo)
focal_method.identifier: createOrUpdate
focal_method.invocations: create save getString onNext onCompleted onError
focal_method.modifiers: @Override public
focal_method.parameters: (Todo todo)
focal_method.return: Observable<Todo>
focal_method.signature: Observable<Todo> createOrUpdate(Todo todo)