Request implements Comparable<Request<T>> { public int getTrafficStatsTag() { return mDefaultTrafficStatsTag; } @Deprecated  Request(String url, Response.ErrorListener listener);  Request(int method, String url, Response.ErrorListener listener); int getMethod(); Object getTag(); Request<?> setTag(Object tag); Response.ErrorListener getErrorListener(); int getTrafficStatsTag(); void addMarker(String tag); Request<?> setRequestQueue(RequestQueue requestQueue); final int getSequence(); final Request<?> setSequence(int sequence); String getUrl(); String getCacheKey(); Cache.Entry getCacheEntry(); Request<?> setCacheEntry(Cache.Entry entry); void cancel(); boolean isCanceled(); Map<String, String> getHeaders(); @Deprecated String getPostBodyContentType(); @Deprecated byte[] getPostBody(); String getBodyContentType(); byte[] getBody(); final Request<?> setShouldCache(boolean shouldCache); final boolean shouldCache(); final Request<?> setShouldRetryServerErrors(boolean shouldRetryServerErrors); final boolean shouldRetryServerErrors(); Priority getPriority(); final int getTimeoutMs(); RetryPolicy getRetryPolicy(); Request<?> setRetryPolicy(RetryPolicy retryPolicy); void markDelivered(); boolean hasHadResponseDelivered(); void deliverError(VolleyError error); @Override int compareTo(Request<T> other); @Override String toString();  }
@Test public void urlParsing() { UrlParseRequest nullUrl = new UrlParseRequest(null); assertEquals(0, nullUrl.getTrafficStatsTag()); UrlParseRequest emptyUrl = new UrlParseRequest(""); assertEquals(0, emptyUrl.getTrafficStatsTag()); UrlParseRequest noHost = new UrlParseRequest("http: assertEquals(0, noHost.getTrafficStatsTag()); UrlParseRequest badProtocol = new UrlParseRequest("bad:http: assertEquals(0, badProtocol.getTrafficStatsTag()); UrlParseRequest goodProtocol = new UrlParseRequest("http: assertFalse(0 == goodProtocol.getTrafficStatsTag()); }