### Question:
MovieController { @PostMapping("/movie/new") public ResponseEntity<?> createMovie(@Valid @RequestBody final MovieDto movieDto, final BindingResult bindingResult) { final List<String> errors = appUtils.getModelErrors(bindingResult, "id"); if (!errors.isEmpty()) { return ResponseEntity.badRequest().body( MovieResultModel.builder().errors(errors).build()); } final MovieDto createdMovieDto = movieService.createMovie(movieDto); final Result<MovieDto> result = MovieResultModel.builder().result(createdMovieDto).build(); return ResponseEntity.ok(result); }  @GetMapping("/movie/search") ResponseEntity<?> searchMovies(
        @RequestParam(value = "text") final Optional<String> text,
        @RequestParam(value = "page") final Optional<Integer> pageNumber,
        @RequestParam(value = "sort") final Optional<String> sortField,
        @RequestParam(value = "asc", defaultValue = "true") final boolean isAscending); @GetMapping("/movie/get/{id}") ResponseEntity<?> getMovie(@PathVariable("id") final UUID id); @PostMapping("/movie/new") ResponseEntity<?> createMovie(@Valid @RequestBody final MovieDto movieDto,
        final BindingResult bindingResult); @PostMapping("/movie/update") ResponseEntity<?> updateMovie(@Valid @RequestBody final MovieDto movieDto,
        final BindingResult bindingResult); @GetMapping("/movie/delete/{id}") ResponseEntity<?> deleteMovie(@PathVariable("id") final UUID id); @GetMapping("/movie/like/{movieId}/{account}") ResponseEntity<?> likeMovie(
        @PathVariable("movieId") final UUID movieId,
        @PathVariable("account") final String account); @GetMapping("/movie/unlike/{movieId}/{account}") ResponseEntity<?> unlikeMovie(
        @PathVariable("movieId") final UUID movieId,
        @PathVariable("account") final String account); @GetMapping("/movie/hasliked/{movieId}/{account}") ResponseEntity<?> hasLiked(
        @PathVariable("movieId") final UUID movieId,
        @PathVariable("account") final String account);  }### Answer:
@Test public void test_createMovie_success() throws Exception { final MovieDto movieDto = createMovie(); final ObjectMapper objectMapper = new ObjectMapper().findAndRegisterModules(); when(movieService.createMovie(movieDto)).thenReturn(movieDto); final String requestContent = objectMapper.writeValueAsString(movieDto); final ResultActions resultActions = mockMvc.perform(post("/movie/new") .content(requestContent) .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()); expectMovieValues(resultActions, movieDto.getId(), Optional.of("result")); }