ProjectsController { @RequestMapping(value = "/{projectId}", method = RequestMethod.DELETE) @ResponseBody public ResponseEntity<?> removeProject(@PathVariable int projectId) { pm.removeProject(projectId); return new ResponseEntity<>(HttpStatus.NO_CONTENT); }  @RequestMapping(value = "/", method = RequestMethod.GET) @ResponseBody Map<String, Object> getProjects(); @RequestMapping(value = "/", method = RequestMethod.POST) @ResponseBody Project addProject(@RequestParam String path); @RequestMapping(value = "/{projectId}", method = RequestMethod.GET) @ResponseBody Project getProject(@PathVariable int projectId); @RequestMapping(value = "/{projectId}", method = RequestMethod.DELETE) @ResponseBody ResponseEntity<?> removeProject(@PathVariable int projectId); @RequestMapping(value = "/reset", method = RequestMethod.GET) @ResponseBody ResponseEntity<?> resetProject(); @RequestMapping(value = "/{projectId}/initialize", method = RequestMethod.POST) @ResponseBody Project initializeProject(@PathVariable int projectId, @RequestBody JsonNode hubConfigDelta); @RequestMapping(value = "/{projectId}/defaults", method = RequestMethod.GET) @ResponseBody synchronized HubSettings getDefaults(@PathVariable int projectId);  }
@Test public void removeProject() { assertEquals(0, ((Collection<ProjectInfo>)pc.getProjects().get("projects")).size()); pc.addProject(projectPath); assertEquals(1, ((Collection<ProjectInfo>)pc.getProjects().get("projects")).size()); pc.removeProject(1); assertEquals(0, ((Collection<ProjectInfo>)pc.getProjects().get("projects")).size()); }