### Question:
RecommendationsController { @GetMapping(value = "/v1/recommendations/info") public ResponseEntity<Object> getRecommendationInfo(@RequestParam(name = "recommendationId", required = true) String recommendationId) { try { return ResponseUtils.buildSucessResponse(recommendationsService.getRecommendationInfo(recommendationId)); } catch (DataException e) { LOGGER.error("Error in getRecommendationInfo "+ e); return ResponseUtils.buildFailureResponse(e); } }  @GetMapping(value = "/v1/recommendations/summary") ResponseEntity<Object> getRecommendationSummary(@RequestParam(name = "ag", required = false) String assetGroup, 
    		@RequestParam(name = "application", required = false) String application, @RequestParam(name = "general", required = true) Boolean general); @GetMapping(value = "/v1/recommendations/summaryByApplication") ResponseEntity<Object> getSummaryByApplication(@RequestParam(name = "ag", required = true) String assetGroup, 
    		@RequestParam(name = "category", required = false) String category); @SuppressWarnings("unchecked") @PostMapping(value = "/v1/recommendations") ResponseEntity<Object> getRecommendations(@RequestBody(required = true) Request request); @SuppressWarnings("unchecked") @PostMapping(value = "/v1/recommendations/detail") ResponseEntity<Object> getRecommendationDetail(@RequestBody(required = true) Request request); @GetMapping(value = "/v1/recommendations/info") ResponseEntity<Object> getRecommendationInfo(@RequestParam(name = "recommendationId", required = true) String recommendationId);  }### Answer:
@Test public void getRecommendationInfoTest() throws Exception { when(recommendationsService.getRecommendationInfo(anyString())).thenReturn(new HashMap<>()); ReflectionTestUtils.setField(recommendationsController, "recommendationsService", recommendationsService); assertTrue(recommendationsController.getRecommendationInfo("id").getStatusCode() == HttpStatus.OK); when(recommendationsService.getRecommendationInfo(anyString())).thenThrow(new DataException()); assertTrue(recommendationsController.getRecommendationInfo("id").getStatusCode() == HttpStatus.EXPECTATION_FAILED); }