code: @Override
      public void run() {
          super.subjectRepository.deleteSubject(subject, new SubjectRepository.SubjectUseCase() {
              @Override
              public void onMissionAccomplished(final Subject subject) {
                  DeleteSubjectUseCaseImp.super.mainThread.post(new Runnable() {
                      @Override
                      public void run() {
                          callback.onMissionAccomplished(subject);
                      }
                  });
              }
  
              @Override
              public void onError(final SubjectException subjectException) {
                  DeleteSubjectUseCaseImp.super.mainThread.post(new Runnable() {
                      @Override
                      public void run() {
                          callback.onError(subjectException);
                      }
                  });
              }
          });
      }
docs: Interactor Use case