### Question:
AppController { @PostMapping @ApiOperation("创建项目") @AppPreAuthorize(AppPreAuthorize.Authorize.SuperAdmin) public Result<App> create(@Valid @RequestBody AppModel appModel) { App app = appService.createApp(appModel); return ok(app); }  @PostMapping @ApiOperation("创建项目") @AppPreAuthorize(AppPreAuthorize.Authorize.SuperAdmin) Result<App> create(@Valid @RequestBody AppModel appModel); @GetMapping("/search") @ApiOperation("查询项目") Result<PageData<App>> searchByAppCodeOrAppName(@RequestParam(required = false) String query, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "20") int size); @GetMapping @ApiOperation("查询所有的项目") Result<List<App>> getAllAppWithAuthorize(); @GetMapping("/{appId:\\d+}") @ApiOperation("查询项目信息") Result<App> getApp(@PathVariable Long appId); @PutMapping("/{appId:\\d+}") @ApiOperation("修改项目信息") @AppPreAuthorize(AppPreAuthorize.Authorize.AppOwner) Result<App> update(@PathVariable Long appId, @Valid @RequestBody AppModel appModel); @GetMapping("/code/{appCode:[0-9a-zA-Z_.-]+}") @ApiOperation("查询项目信息") Result<App> getAppByCode(@PathVariable String appCode); @ApiOperation("项目菜单") @GetMapping("/{appId:\\d+}/navtree") Result<List<EnvClusterInfo>> nav(@PathVariable long appId);  }### Answer:
@Test public void create() { User user = userRepository.findAll().get(0); AppModel appModel = new AppModel("阿波罗测试项目", "apollo-test", user.getDepartment().getId(), user.getId(), null); Result<App> appResult = appController.create(appModel); Assert.assertTrue(appResult.success()); }