### Question:
PluginController { @RequestMapping(value = "/activate", method = RequestMethod.POST) @ResponseBody public JsonResponse activatePlugin(@RequestBody PluginActivatingDto pluginActivatingDto) throws NotFoundException { long componentId = getForumComponentId(); pluginService.updatePluginActivating(pluginActivatingDto, componentId); return new JsonResponse(JsonResponseStatus.SUCCESS); } @Autowired  PluginController(PluginService pluginService, ComponentService componentService, PluginLoader pluginLoader,
                            UserService userService); @RequestMapping(value = "/list", method = RequestMethod.GET) ModelAndView getPlugins(); @RequestMapping(value = "/configure/{name}", method = RequestMethod.GET) ModelAndView startConfiguringPlugin(@PathVariable String name); @RequestMapping(value = "/configure/{name}", method = RequestMethod.POST) ModelAndView updateConfiguration(Model model, @ModelAttribute PluginConfiguration newConfiguration); @RequestMapping(value = "/activate", method = RequestMethod.POST) @ResponseBody JsonResponse activatePlugin(@RequestBody PluginActivatingDto pluginActivatingDto);  }### Answer:
@Test public void updateEnablingShouldUpdatePassedPlugin() throws NotFoundException { long componentId = 25L; Component component = new Component(); component.setId(componentId); when(componentService.getComponentOfForum()).thenReturn(component); PluginActivatingDto pluginActivatingDto = new PluginActivatingDto("Dummy plugin", true); String expectedStatus = new JsonResponse(JsonResponseStatus.SUCCESS).getStatus().name(); String actualStatus = pluginController.activatePlugin(pluginActivatingDto).getStatus().name(); assertEquals(actualStatus, expectedStatus); }