@Test
public void client_cache_upto_date() throws Exception
{
Request request = mockRequest();
Response response = mockResponse();
ClasspathAssetAliasManager aliasManager = mockClasspathAssetAliasManager();
ResourceCache cache = mockResourceCache();
ResourceStreamer streamer = mockResourceStreamer();
long now = System.currentTimeMillis();
train_getPath(request, SMILEY_CLIENT_URL);
train_toResourcePath(aliasManager, SMILEY_CLIENT_URL, SMILEY_PATH);
train_requiresDigest(cache, SMILEY, false);
train_getDateHeader(request, AssetDispatcher.IF_MODIFIED_SINCE_HEADER, now);
train_getTimeModified(cache, SMILEY, now - 1000);
response.sendError(HttpServletResponse.SC_NOT_MODIFIED, "");
replay();
Dispatcher d = new AssetDispatcher(streamer, aliasManager, cache);