@Test @Transactional public void testPostDelete_notUsed() throws Exception { final MessageFormat format = messageFormatTestTools.createMessageFormat("Format 1"); final long formatId = format.getId(); final Path expectedJarPath = Paths.get(deserializerUploadPath, format.getJar()); FileTestTools.createDummyFile(expectedJarPath.toString(), "MyContests"); assertTrue("Sanity test", Files.exists(expectedJarPath)); mockMvc .perform(post("/configuration/messageFormat/delete/" + formatId) .with(user(adminUserDetails)) .with(csrf())) .andExpect(status().is3xxRedirection()) .andExpect(redirectedUrl("/configuration/messageFormat")); assertFalse("Should NOT have message format", messageFormatRepository.existsById(formatId)); assertFalse("Should have been removed", Files.exists(expectedJarPath)); }
@RequestMapping(path = "/create", method = RequestMethod.GET) public String createMessageFormat(final MessageFormatForm messageFormatForm, final Model model) { setupBreadCrumbs(model, "Create", null); return "configuration/messageFormat/create"; }
MessageFormatController extends BaseController { @RequestMapping(path = "/create", method = RequestMethod.GET) public String createMessageFormat(final MessageFormatForm messageFormatForm, final Model model) { setupBreadCrumbs(model, "Create", null); return "configuration/messageFormat/create"; } }
MessageFormatController extends BaseController { @RequestMapping(path = "/create", method = RequestMethod.GET) public String createMessageFormat(final MessageFormatForm messageFormatForm, final Model model) { setupBreadCrumbs(model, "Create", null); return "configuration/messageFormat/create"; }  }
MessageFormatController extends BaseController { @RequestMapping(path = "/create", method = RequestMethod.GET) public String createMessageFormat(final MessageFormatForm messageFormatForm, final Model model) { setupBreadCrumbs(model, "Create", null); return "configuration/messageFormat/create"; }  @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); }
MessageFormatController extends BaseController { @RequestMapping(path = "/create", method = RequestMethod.GET) public String createMessageFormat(final MessageFormatForm messageFormatForm, final Model model) { setupBreadCrumbs(model, "Create", null); return "configuration/messageFormat/create"; }  @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);  }