### Question:
MovieController { @GetMapping("/movie/like/{movieId}/{account}") public ResponseEntity<?> likeMovie( @PathVariable("movieId") final UUID movieId, @PathVariable("account") final String account) { try { movieService.likeMovie(movieId, account); return ResponseEntity.ok().build(); } catch (final MovieNotFoundException ex) { return ResponseEntity.notFound().build(); } catch (final MovieConditionalException ex) { return ResponseEntity.status(HttpStatus.CONFLICT).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_likeMovie_notFound() throws Exception { final UUID movieId = UUID.randomUUID(); final String account = "test_account"; final String url = String.format("/movie/like/%s/%s", movieId, account); doThrow(new MovieNotFoundException()).when(movieService).likeMovie(movieId, account); mockMvc.perform(get(url)).andExpect(status().isNotFound()); }
@Test public void test_likeMovie_conflict() throws Exception { final UUID movieId = UUID.randomUUID(); final String account = "test_account"; final String url = String.format("/movie/like/%s/%s", movieId, account); doThrow(new MovieConditionalException()).when(movieService).likeMovie(movieId, account); mockMvc.perform(get(url)).andExpect(status().isConflict()); }