// test that the CreatedVsResolvedChart is called with the correct params. @Test public void testGetSearchRequestViewHtml() throws ObjectConfigurationException { setupGetSearchRequestMocks(); mockChartFactory.generateRecentlyCreated(context, 30, ChartFactory.PeriodName.daily); mockController.setReturnValue(new Chart(null, null, null, EasyMap.build("chart", chartObject))); mockController.replay(); final RecentlyCreatedChartPortlet portlet = new RecentlyCreatedChartPortlet( jiraAuthenticationContext, null, mockApplicationProperties, null, mockChartUtils, mockChartFactory) { public Map<String, Object> generateCommonParameters( final PortletConfiguration portletConfiguration) { return new HashMap<String, Object>(); } }; portlet.init(mockPortletModuleDescriptor); String html = portlet.getSearchRequestViewHtml(mockPortletConfiguration, null); assertEquals("<html>mychart</html>", html); mockController.verify(); mockChartUtilsControl.verify(); mockSearchRequestControl.verify(); mockPortletConfigurationControl.verify(); mockPortletModuleDescriptorControl.verify(); }