class MosaicRepositoryOkHttpImpl extends AbstractRepositoryOkHttpImpl implements MosaicRepository {

  @Override
  public Observable<List<MosaicInfo>> getMosaics(List<MosaicId> ids) {
    MosaicIds mosaicIds = new MosaicIds();
    mosaicIds.mosaicIds(ids.stream().map(MosaicId::getIdAsHex).collect(Collectors.toList()));
    Callable<List<MosaicInfoDTO>> callback = () -> getClient().getMosaics(mosaicIds);
    return exceptionHandling(
        networkTypeObservable.flatMap(
            networkType ->
                call(callback)
                    .flatMapIterable(item -> item)
                    .map(mosaicInfoDTO -> createMosaicInfo(mosaicInfoDTO, networkType))
                    .toList()
                    .toObservable()));
  }

  public  MosaicRepositoryOkHttpImpl(
      ApiClient apiClient, Observable<NetworkType> networkTypeObservable);

}