// create the mock request context
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
request.setUserPrincipal(new MockPrincipal("david"));
MockRequestContext context = new MockRequestContext(request, response);
// create a simple key
String window1 = "555-01";
ContentCacheKey cckey1 = contentCache.createCacheKey(context, window1);
assertEquals(cckey1.getKey(), "david/portal/555-01");
// create a another key for desktop
String window2 = "555-02";
context.getParameterMap().put("encoder", "desktop");
ContentCacheKey cckey2 = contentCache.createCacheKey(context, window2);
assertEquals(cckey2.getKey(), "david/desktop/555-02");
// create some PortletContent mock objects
PortletContent content1 = new MockPortletContent(cckey1, 100, "ContentOne", "content1content1content1content1");