- // Test watch
- PolicyNotificationController controller = new PolicyNotificationController();
- controller.commonClassDao = dao;
- MockHttpServletRequest request = new MockHttpServletRequest();
- request.setBodyContent("{\n\"watchData\": {\"name\": \"testVal\",\"path\": \"testPath\"\n}}\n");
- MockHttpServletResponse response = new MockHttpServletResponse();
- ModelAndView model = controller.watchPolicy(request, response);
- assertNull(model);
- assertEquals(response.getStatusCode(), HttpServletResponse.SC_OK);
+ // Test watch
+ PolicyNotificationController controller = new PolicyNotificationController();
+ controller.commonClassDao = dao;
+ MockHttpServletRequest request = new MockHttpServletRequest();
+ request.setBodyContent(
+ "{\n\"watchData\": {\"name\": \"testVal\",\"path\": \"testPath\"\n}}\n");
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ ModelAndView model = controller.watchPolicy(request, response);
+ assertNull(model);
+ assertEquals(response.getStatusCode(), HttpServletResponse.SC_OK);