### Question:
UserDataRepository implements UserRepository { @Override public Observable<User> user(int userId) { final UserDataStore userDataStore = this.userDataStoreFactory.create(userId); return userDataStore.userEntityDetails(userId).map(this.userEntityDataMapper::transform); } @Inject  UserDataRepository(UserDataStoreFactory dataStoreFactory,
      UserEntityDataMapper userEntityDataMapper); @Override Observable<List<User>> users(); @Override Observable<User> user(int userId);  }### Answer:
@Test public void testGetUserHappyCase() { UserEntity userEntity = new UserEntity(); given(mockUserDataStore.userEntityDetails(FAKE_USER_ID)).willReturn(Observable.just(userEntity)); userDataRepository.user(FAKE_USER_ID); verify(mockUserDataStoreFactory).create(FAKE_USER_ID); verify(mockUserDataStore).userEntityDetails(FAKE_USER_ID); }