MessageFormatController extends BaseController { @RequestMapping(path = "", method = RequestMethod.GET) public String index(final Model model) { setupBreadCrumbs(model, null, null); final Iterable<MessageFormat> defaultMessageFormats = messageFormatRepository.findByIsDefaultFormatOrderByNameAsc(true); final Iterable<MessageFormat> customMessageFormats = messageFormatRepository.findByIsDefaultFormatOrderByNameAsc(false); model.addAttribute("defaultMessageFormats", defaultMessageFormats); model.addAttribute("customMessageFormats", customMessageFormats); return "configuration/messageFormat/index"; }  @RequestMapping(path = "", method = RequestMethod.GET) String index(final Model model); @RequestMapping(path = "/create", method = RequestMethod.GET) String createMessageFormat(final MessageFormatForm messageFormatForm, final Model model); @RequestMapping(path = "/edit/{id}", method = RequestMethod.GET) String editMessageFormat(
        @PathVariable final Long id,
        final MessageFormatForm messageFormatForm,
        final Model model,
        final RedirectAttributes redirectAttributes); @RequestMapping(path = "/update", method = RequestMethod.POST) String create(
        @Valid final MessageFormatForm messageFormatForm,
        final BindingResult bindingResult,
        final RedirectAttributes redirectAttributes,
        @RequestParam final Map<String, String> allRequestParams); @RequestMapping(path = "/delete/{id}", method = RequestMethod.POST) String deleteCluster(@PathVariable final Long id, final RedirectAttributes redirectAttributes);  }
@Test @Transactional public void testIndex() throws Exception { final MessageFormat format1 = messageFormatTestTools.createMessageFormat("Format 1"); final MessageFormat format2 = messageFormatTestTools.createMessageFormat("Format 2"); mockMvc .perform(get("/configuration/messageFormat").with(user(adminUserDetails))) .andExpect(status().isOk()) .andExpect(content().string(containsString(format1.getName()))) .andExpect(content().string(containsString(format1.getClasspath()))) .andExpect(content().string(containsString(format2.getName()))) .andExpect(content().string(containsString(format2.getClasspath()))); }