private void assertNoCacheRequest(String inputUrl, String expectedRedirect) throws Exception {
HttpGet get = obtainGetMethod(inputUrl, false);
HttpResponse response = perform(get);
EntityUtils.consume(response.getEntity());
get.releaseConnection();
assertEquals(HttpStatus.SC_MOVED_TEMPORARILY, getStatusCode(response));
assertEquals(expectedRedirect, response.getFirstHeader(HttpHeaders.LOCATION).getValue());
assertEquals("no-cache, no-store", response.getFirstHeader(HttpHeaders.CACHE_CONTROL).getValue());
assertEquals("no-cache", response.getFirstHeader(HttpHeaders.PRAGMA).getValue());