public void setUp() throws Exception { super.setUp(); RhnBaseTestCase.disableLocalizationServiceLogging(); List dataList = CSVWriterTest.getTestListOfMaps(); mreq = mock(HttpServletRequest.class); mresp = mock(HttpServletResponse.class); msess = mock(HttpSession.class); mcontext = mock(PageContext.class); req = (HttpServletRequest) mreq.proxy(); session = (HttpSession) msess.proxy(); context = (PageContext) mcontext.proxy(); writer = new RhnMockJspWriter(); mcontext .expects(atLeastOnce()) .method("getAttribute") .with(eq(listName)) .will(returnValue(dataList)); mcontext.expects(atLeastOnce()).method("getRequest").withNoArguments().will(returnValue(req)); mreq.expects(atLeastOnce()).method("getSession").with(eq(true)).will(returnValue(session)); csv = new CSVTag(); csv.setName("testIsMyName"); lst = new ListSetTag(); csv.setPageContext(context); csv.setParent(lst); csv.setDataset(listName); msess .expects(atLeastOnce()) .method("setAttribute") .with(eq("exportColumns_" + csv.getUniqueName()), isA(String.class)); msess .expects(atLeastOnce()) .method("setAttribute") .with(eq("pageList_" + csv.getUniqueName()), isA(List.class)); }