### Question:
MovieController { @GetMapping("/movie/get/{id}") public ResponseEntity<?> getMovie(@PathVariable("id") final UUID id) { try { final MovieDto result = movieService.getMovie(id); return ResponseEntity.ok(result); } catch (final MovieNotFoundException ex) { return ResponseEntity.notFound().build(); } }  @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_getMovie_notFound() throws Exception { final UUID id = UUID.randomUUID(); when(movieService.getMovie(id)).thenThrow(new MovieNotFoundException()); mockMvc.perform(get("/movie/get/" + id)).andExpect(status().isNotFound()); }