anchor.diff:          // '#/'
           // hash path
           isHashPath = true;
  -        uri = replacePathAndQuery(uri, uri.fragment);
  +        uri = _replacePathAndQuery(uri, uri.fragment);
         } else if (uri.fragment.startsWith('!/')) {
           // '#!/'
           // hashbang path
           isHashPath = true;
  -        uri = replacePathAndQuery(uri, uri.fragment.substring(1));
  +        uri = _replacePathAndQuery(uri, uri.fragment.substring(1));
         } else if (isHashPath) {
           // still use the hash if mode="hash"
           if (uri.fragment.length == 0) {
  -          uri = uri.replace(path: '/');
  +          uri = uri.replace(path: '/', query: '');
           } else {
  -          uri = replacePathAndQuery(uri, uri.fragment);
  +          uri = _replacePathAndQuery(uri, uri.fragment);
           }
         }
   
  
positive.code:   String toString() => uri.toString() + " isHashPath: ${isHashPath}";
  
    /// Map represenation of this RouteUri.
    Map<String, dynamic> toMap() {
      Map<String, dynamic> map = new Map<String, dynamic>();
      map['path'] = this.path;
      map['hash'] = this.hash;
  
negative.code:     }
    }
  }
  
  /// Given a pathAndQuery string (e.g., '/a/b/c?test=ok) creates a new Uri with
  /// path and query fields of the uri replaced with the ones form the
  /// pathAndQuery string, eg.,
  ///  path: /a/b/c
  ///  query: test=ok
  ///
  Uri _replacePathAndQuery(Uri uri, String pathAndQuery) {
    String path = pathAndQuery;
    String query = "";
    int index = pathAndQuery.indexOf("?");
    if (index != -1) {
      path = pathAndQuery.substring(0, index); // get rid of query
      query = pathAndQuery.substring(index + 1); // just the query
    }
    uri = uri.replace(path: path, query: query);
    return uri;
  }
  