class NamespaceRepositoryOkHttpImpl extends AbstractRepositoryOkHttpImpl implements NamespaceRepository {

  @Override
  public Observable<List<NamespaceName>> getNamespaceNames(List<NamespaceId> namespaceIds) {

    NamespaceIds ids =
        new NamespaceIds()
            .namespaceIds(
                namespaceIds.stream().map(NamespaceId::getIdAsHex).collect(Collectors.toList()));

    Callable<List<NamespaceNameDTO>> callback = () -> getClient().getNamespacesNames(ids);

    return exceptionHandling(
        call(callback)
            .flatMapIterable(item -> item)
            .map(this::toNamespaceName)
            .toList()
            .toObservable());
  }

  public  NamespaceRepositoryOkHttpImpl(ApiClient apiClient);

}