### Question:
UseCase { public void execute(DisposableObserver<T> observer, Params params) { Preconditions.checkNotNull(observer); final Observable<T> observable = this.buildUseCaseObservable(params) .subscribeOn(Schedulers.from(threadExecutor)) .observeOn(postExecutionThread.getScheduler()); addDisposable(observable.subscribeWith(observer)); } UseCase(ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread); void execute(DisposableObserver<T> observer, Params params); void dispose();  }### Answer:
@Test public void testBuildUseCaseObservableReturnCorrectResult() { useCase.execute(testObserver, Params.EMPTY); assertThat(testObserver.valuesCount).isZero(); }
@Test public void testShouldFailWhenExecuteWithNullObserver() { expectedException.expect(NullPointerException.class); useCase.execute(null, Params.EMPTY); }