@Override
  protected Optional<String> doRemoteUrl(final HttpRequest request) {
    String uri = request.getUri();
    if (!proxyConfig.canAccessedBy(uri)) {
      return absent();
    }

    return of(proxyConfig.remoteUrl(uri));
  }
  @Override
  @SuppressWarnings("unchecked")
  public ResponseHandler apply(final MocoConfig config) {
    if (config.isFor(MocoConfig.URI_ID)) {
      String newLocalBase = (String) config.apply(proxyConfig.localBase());
      return new ProxyBatchResponseHandler(
          from(newLocalBase).to(proxyConfig.remoteBase()), failover());
    }

    return this;
  }