### Question:
GetUserDetails extends UseCase<User, GetUserDetails.Params> { @Override Observable<User> buildUseCaseObservable(Params params) { Preconditions.checkNotNull(params); return this.userRepository.user(params.userId); } @Inject  GetUserDetails(UserRepository userRepository, ThreadExecutor threadExecutor,
      PostExecutionThread postExecutionThread);   }### Answer:
@Test public void testGetUserDetailsUseCaseObservableHappyCase() { getUserDetails.buildUseCaseObservable(Params.forUser(USER_ID)); verify(mockUserRepository).user(USER_ID); verifyNoMoreInteractions(mockUserRepository); verifyZeroInteractions(mockPostExecutionThread); verifyZeroInteractions(mockThreadExecutor); }
@Test public void testShouldFailWhenNoOrEmptyParameters() { expectedException.expect(NullPointerException.class); getUserDetails.buildUseCaseObservable(null); }