DashboardController extends RestrictedBaseController { @RequestMapping( value = {"/get_DashboardPAPStatusData"}, method = {org.springframework.web.bind.annotation.RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getPAPStatusData(HttpServletRequest request, HttpServletResponse response) { try { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY); addPAPToTable(); model.put("papTableDatas", mapper.writeValueAsString(papStatusData)); response.getWriter().write(new JSONObject(new JsonMessage(mapper.writeValueAsString(model))).toString()); } catch (Exception e) { policyLogger.error(exceptionOccured + e); } }  void setCommonClassDao(CommonClassDao commonClassDao); void setSystemLogDbDao(SystemLogDbDao systemDAO); PolicyController getPolicyController(); void setPolicyController(PolicyController policyController); @RequestMapping( value = {"/get_DashboardPolicyCRUDData"}, method = {org.springframework.web.bind.annotation.RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void get_DashboardPolicyCrudData(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/dashboardController/dashboardAdvancedSearch.htm"}, method = {org.springframework.web.bind.annotation.RequestMethod.POST}) void dashboardAdvancedSearch(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_DashboardPdpPolicyCRUDData"}, method = {org.springframework.web.bind.annotation.RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void get_DashboardPdpPolicyCrudData(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_DashboardLoggingData"}, method = {org.springframework.web.bind.annotation.RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getData(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_DashboardSystemAlertData"}, method = {org.springframework.web.bind.annotation.RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getSystemAlertData(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_DashboardPAPStatusData"}, method = {org.springframework.web.bind.annotation.RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPAPStatusData(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_DashboardPDPStatusData"}, method = {org.springframework.web.bind.annotation.RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPDPStatusData(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_DashboardPolicyActivityData"}, method = {org.springframework.web.bind.annotation.RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPolicyActivityData(HttpServletRequest request, HttpServletResponse response); void addPAPToTable(); void addPolicyCrudInfoToTable(); void addPDPToTable();  }
@Test public void testGetPAPStatusData() { try { controller.getPAPStatusData(request, response); assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("papTableDatas")); } catch (UnsupportedEncodingException e) { logger.error("Exception Occured" + e); fail(); } }