ProjectsController { @RequestMapping(value = "/{projectId}", method = RequestMethod.GET) @ResponseBody public Project getProject(@PathVariable int projectId) { return pm.getProject(projectId); }  @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 getProject() { assertEquals(0, ((Collection<ProjectInfo>)pc.getProjects().get("projects")).size()); assertEquals(false, pc.getProjects().keySet().contains("lastProject")); pc.addProject(projectPath); Project project = pc.getProject(1); assertEquals(projectPath, project.path); assertEquals(1, project.id); assertEquals(false, adminHubConfig.getHubProject().isInitialized()); }