### Question:
UserDataRepository implements UserRepository { @Override public Observable<List<User>> users() { final UserDataStore userDataStore = this.userDataStoreFactory.createCloudDataStore(); return userDataStore.userEntityList().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 testGetUsersHappyCase() { List<UserEntity> usersList = new ArrayList<>(); usersList.add(new UserEntity()); given(mockUserDataStore.userEntityList()).willReturn(Observable.just(usersList)); userDataRepository.users(); verify(mockUserDataStoreFactory).createCloudDataStore(); verify(mockUserDataStore).userEntityList(); }