cacheMock.expects(once()).method("getKeys").withNoArguments().will(returnValue(keys));
cacheMock.expects(once()).method("get").with(eq(WINDOW_ID)).will(returnValue(new Element(WINDOW_ID, window)));
cacheMock.expects(once()).method("get").with(eq("window2")).will(returnValue(new Element("window2", window2)));
cacheMock.expects(once()).method("get").with(eq("window3")).will(returnValue(new Element("window3", window3)));
PortletWindowCache windowCache = new EhPortletWindowCache((Ehcache) cacheMock.proxy());
Set allPortletWindows = windowCache.getAllPortletWindows();
assertNotNull(allPortletWindows);
assertEquals(3, allPortletWindows.size());
}