### Question:
DescriptiveDictionaryController { @RequestMapping( value = {"/get_DescriptiveScopeByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getDescriptiveDictionaryByNameEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getDataByEntity(response, descriptiveDatas, dScopeName, DescriptiveScope.class); } @Autowired  DescriptiveDictionaryController(CommonClassDao commonClassDao);  DescriptiveDictionaryController(); void setCommonClassDao(CommonClassDao commonClassDao); @RequestMapping( value = {"/get_DescriptiveScopeByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getDescriptiveDictionaryByNameEntityData(HttpServletResponse response); @RequestMapping( value = {"/get_DescriptiveScope"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getDescriptiveDictionaryEntityData(HttpServletResponse response); @RequestMapping(value = {"/descriptive_dictionary/save_descriptive"}, method = {RequestMethod.POST}) ModelAndView saveDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/descriptive_dictionary/remove_descriptiveScope"}, method = {RequestMethod.POST}) void removeDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response);  }### Answer:
@Test public void testGetDescriptiveDictionaryByNameEntityData() { when(commonClassDao.getDataByColumn(DescriptiveScope.class, "descriptiveScopeName")).thenReturn(data); controller.getDescriptiveDictionaryByNameEntityData(response); try { assertTrue(response.getContentAsString() != null && response.getContentAsString().contains("descriptiveScopeDictionaryDatas")); } catch (Exception e) { fail(); logger.error(e.getMessage(), e); } }