Spring Unit testing rest controller
问题 What is the best and easiest solution to test these sample get mappings? Could you show some easy example? @GetMapping("/") public List<UserDto> get() { return userService.getUsers().stream().map((User user) -> toUserDto(user)).collect(Collectors.toList()); } @GetMapping(path = "/{id}") public HttpEntity<UserDto> findById(@PathVariable(name = "id") long id) { User user = userService.unique(id); if (user != null) { return new ResponseEntity<>(toUserDto(user), HttpStatus.OK); } else { return