Request implements Comparable<Request<T>> { public String getCacheKey() { String url = getUrl(); int method = getMethod(); if (method == Method.GET || method == Method.DEPRECATED_GET_OR_POST) { return url; } return Integer.toString(method) + '-' + url; } @Deprecated  Request(String url, Response.ErrorListener listener);  Request(int method, String url, @Nullable Response.ErrorListener listener); int getMethod(); Request<?> setTag(Object tag); Object getTag(); @Nullable Response.ErrorListener getErrorListener(); int getTrafficStatsTag(); Request<?> setRetryPolicy(RetryPolicy retryPolicy); void addMarker(String tag); Request<?> setRequestQueue(RequestQueue requestQueue); final Request<?> setSequence(int sequence); final int getSequence(); String getUrl(); String getCacheKey(); Request<?> setCacheEntry(Cache.Entry entry); Cache.Entry getCacheEntry(); @CallSuper 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(); void markDelivered(); boolean hasHadResponseDelivered(); void deliverError(VolleyError error); @Override int compareTo(Request<T> other); @Override String toString();  }
@Test public void getCacheKey() { assertEquals( "http: new UrlParseRequest(Method.GET, "http: assertEquals( "http: new UrlParseRequest(Method.DEPRECATED_GET_OR_POST, "http: .getCacheKey()); assertEquals( "1-http: new UrlParseRequest(Method.POST, "http: assertEquals( "2-http: new UrlParseRequest(Method.PUT, "http: }