### Question:
MovieController { @GetMapping("/movie/hasliked/{movieId}/{account}") public ResponseEntity<?> hasLiked( @PathVariable("movieId") final UUID movieId, @PathVariable("account") final String account) { final boolean result = movieService.hasLiked(movieId, account); 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_hasLiked_true() throws Exception { final UUID movieId = UUID.randomUUID(); final String account = "test_account"; final String url = String.format("/movie/hasliked/%s/%s", movieId, account); when(movieService.hasLiked(movieId, account)).thenReturn(true); mockMvc.perform(get(url)) .andExpect(status().isOk()) .andExpect(jsonPath("$").value(true)); }
@Test public void test_hasLiked_false() throws Exception { final UUID movieId = UUID.randomUUID(); final String account = "test_account"; final String url = String.format("/movie/hasliked/%s/%s", movieId, account); when(movieService.hasLiked(movieId, account)).thenReturn(false); mockMvc.perform(get(url)) .andExpect(status().isOk()) .andExpect(jsonPath("$").value(false)); }