@Test public void testNeitherContentLocationNorLocationInvalidatedIfHostNotSameAsRequest() throws IOException { URI requestUri = URI.create("http: URI contentLocationUri = URI.create("http: URI locationUri = URI.create("http: HTTPRequest request = new HTTPRequest(requestUri, HTTPMethod.POST); Headers responseHeaders = new Headers(). add(new Header(HeaderConstants.CONTENT_LOCATION, contentLocationUri.toString())). add(new Header(HeaderConstants.LOCATION, locationUri.toString())); when(responseResolver.resolve(isA(HTTPRequest.class))).thenReturn(new HTTPResponse(Status.CREATED, responseHeaders)); cache.execute(request); verify(cacheStorage, never()).invalidate(contentLocationUri); verify(cacheStorage, never()).invalidate(locationUri); }
public HTTPResponse execute(final HTTPRequest request) { return execute(request, helper.isEndToEndReloadRequest(request)); }
HTTPCache { public HTTPResponse execute(final HTTPRequest request) { return execute(request, helper.isEndToEndReloadRequest(request)); } }
HTTPCache { public HTTPResponse execute(final HTTPRequest request) { return execute(request, helper.isEndToEndReloadRequest(request)); } HTTPCache(CacheStorage storage, ResponseResolver resolver); }
HTTPCache { public HTTPResponse execute(final HTTPRequest request) { return execute(request, helper.isEndToEndReloadRequest(request)); } HTTPCache(CacheStorage storage, ResponseResolver resolver); void clear(); CacheStorage getStorage(); ResponseResolver getResolver(); CacheStatistics getStatistics(); HTTPResponse execute(final HTTPRequest request); HTTPResponse executeRefresh(final HTTPRequest request); void shutdown(); boolean isTranslateHEADToGET(); void setTranslateHEADToGET(boolean translateHEADToGET); }
HTTPCache { public HTTPResponse execute(final HTTPRequest request) { return execute(request, helper.isEndToEndReloadRequest(request)); } HTTPCache(CacheStorage storage, ResponseResolver resolver); void clear(); CacheStorage getStorage(); ResponseResolver getResolver(); CacheStatistics getStatistics(); HTTPResponse execute(final HTTPRequest request); HTTPResponse executeRefresh(final HTTPRequest request); void shutdown(); boolean isTranslateHEADToGET(); void setTranslateHEADToGET(boolean translateHEADToGET);  }