### Question:
InstanceController { @ApiOperation("所有实例") @PostMapping(value = "by-namespace") public Result<PageDTO<InstanceDTO>> getByNamespace(@RequestBody PageQuery<InstanceNamespaceReq> instancePageQuery) { Pageable pageable = PageRequest.of(instancePageQuery.getPageNo(), instancePageQuery.getPageSize()); return Result.ok(instanceService.findInstancesByNamespace(instancePageQuery.getData().getNamespaceId(), pageable)); }  @ApiOperation("使用最新配置实例") @PostMapping(value = "by-release") Result<PageDTO<InstanceDTO>> getByRelease(@RequestBody PageQuery<Long> releasePage); @ApiOperation("所有实例") @PostMapping(value = "by-namespace") Result<PageDTO<InstanceDTO>> getByNamespace(@RequestBody PageQuery<InstanceNamespaceReq> instancePageQuery); @ApiOperation("所有实例数") @RequestMapping(value = "/namespaceId/{namespaceId}/count", method = RequestMethod.GET) Result<Number> getInstanceCountByNamespace(@PathVariable Long namespaceId); @ApiOperation("使用的非最新配置的实例") @RequestMapping(value = "/namespaceId/{namespaceId}/releaseIds/{releaseIds}/by-namespace-and-releases-not-in", method = RequestMethod.GET) Result<List<InstanceDTO>> getByReleasesNotIn(@RequestParam Long namespaceId, @RequestParam String releaseIds);  }### Answer:
@Test public void getByNamespace() { Long namespaceId = namespaceRepository.findAll().get(0).getId(); PageQuery<InstanceNamespaceReq> instanceNamespaceReqPageQuery = createPageQuery(namespaceId); instanceController.getByNamespace(instanceNamespaceReqPageQuery); }