ActionPolicyDictionaryController { @RequestMapping(value = {"/action_dictionary/remove_actionPolicyDict"}, method = {RequestMethod.POST}) public void removeActionPolicyDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.removeData(request, response, actionDatas, ActionPolicyDict.class); } @Autowired  ActionPolicyDictionaryController(CommonClassDao commonClassDao);  ActionPolicyDictionaryController(); void setCommonClassDao(CommonClassDao commonClassDao); @RequestMapping( value = {"/get_ActionPolicyDictDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getActionEntitybyName(HttpServletResponse response); @RequestMapping( value = {"/get_ActionPolicyDictData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getActionPolicyDictionaryEntityData(HttpServletResponse response); @RequestMapping(value = {"/action_dictionary/save_ActionDict"}, method = {RequestMethod.POST}) ModelAndView saveActionPolicyDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/action_dictionary/remove_actionPolicyDict"}, method = {RequestMethod.POST}) void removeActionPolicyDictionary(HttpServletRequest request, HttpServletResponse response);  }
@Test public void testRemoveActionPolicyDictionary() { jsonString = "{\"data\":{\"$$hashKey\":\"uiGrid-003S\",\"attributeName\":\"Test\",\"body\":\"{}\",\"createdDate\":" + "1518195117000,\"description\":\"test\",\"header\":\"test=12\",\"id\":1,\"method\":\"GET\"," + "\"modifiedDate\":1518195489000,\"type\":\"REST\",\"url\":\"http: + "{\"userLoginId\":\"demo\",\"userName\":\"Demo\"},\"userModifiedBy\":{\"userLoginId\":\"demo\"," + "\"userName\":\"Demo\"}}}"; try (BufferedReader br = new BufferedReader(new StringReader(jsonString))) { when(request.getReader()).thenReturn(br); controller.removeActionPolicyDictionary(request, response); assertTrue(response.getContentAsString() != null && response.getContentAsString().contains("actionPolicyDictionaryDatas")); } catch (Exception e) { logger.error("Exception" + e); } }