@Test
public void doRenderMarkupCachedContentValidationMethodExpiredTest() throws PortletException, IOException, PortletContainerException {
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
TestingCacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult> cacheState = new TestingCacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult>();
CacheControl cacheControl = cacheState.getCacheControl();
// by setting useCachedContent to true, we are saying even though content is expired, replay it anyways (since etag is still valid)
cacheControl.setUseCachedContent(true);
cacheControl.setETag("123456");
cacheControl.setExpirationTime(300);
final PortletRenderResult portletResult = new PortletRenderResult("title", null, 0, 100);
final String output = "<p>Some content</p>";
CachedPortletData<PortletRenderResult> cachedPortletData = new CachedPortletData<PortletRenderResult>(
portletResult, output, null, null, false, cacheControl.getETag(), 1);
cacheState.setCachedPortletData(cachedPortletData);
final long expTime = cachedPortletData.getExpirationTime();
setupPortletExecutionMocks(request);