@Test public void requestTest() throws Exception { this.oadrMockMvc.perform(MockMvcRequestBuilders.get(EIREGISTERPARTY_ENDPOINT).with(VTN_SECURITY_SESSION)) .andExpect(MockMvcResultMatchers.status().is(HttpStatus.METHOD_NOT_ALLOWED_405)); this.oadrMockMvc.perform(MockMvcRequestBuilders.put(EIREGISTERPARTY_ENDPOINT).with(VTN_SECURITY_SESSION)) .andExpect(MockMvcResultMatchers.status().is(HttpStatus.METHOD_NOT_ALLOWED_405)); this.oadrMockMvc.perform(MockMvcRequestBuilders.delete(EIREGISTERPARTY_ENDPOINT).with(VTN_SECURITY_SESSION)) .andExpect(MockMvcResultMatchers.status().is(HttpStatus.METHOD_NOT_ALLOWED_405)); String content = ""; this.oadrMockMvc.perform( MockMvcRequestBuilders.post(EIREGISTERPARTY_ENDPOINT).with(VTN_SECURITY_SESSION).content(content)) .andExpect(MockMvcResultMatchers.status().is(HttpStatus.BAD_REQUEST_400)); content = "mouaiccool"; this.oadrMockMvc.perform( MockMvcRequestBuilders.post(EIREGISTERPARTY_ENDPOINT).with(VTN_SECURITY_SESSION).content(content)) .andExpect(MockMvcResultMatchers.status().is(HttpStatus.NOT_ACCEPTABLE_406)); }
@RequestMapping(value = Oadr20bUrlPath.EI_REGISTER_PARTY_SERVICE, method = RequestMethod.POST) @ResponseBody public String request(@RequestBody String payload, Principal principal) throws Oadr20bMarshalException, Oadr20bUnmarshalException, Oadr20bApplicationLayerException, Oadr20bXMLSignatureValidationException, Oadr20bXMLSignatureException, OadrSecurityException, IOException { return oadr20bVENEiRegisterPartyService.request(principal.getName(), payload); }
Oadr20bVENEiRegisterPartyController { @RequestMapping(value = Oadr20bUrlPath.EI_REGISTER_PARTY_SERVICE, method = RequestMethod.POST) @ResponseBody public String request(@RequestBody String payload, Principal principal) throws Oadr20bMarshalException, Oadr20bUnmarshalException, Oadr20bApplicationLayerException, Oadr20bXMLSignatureValidationException, Oadr20bXMLSignatureException, OadrSecurityException, IOException { return oadr20bVENEiRegisterPartyService.request(principal.getName(), payload); } }
Oadr20bVENEiRegisterPartyController { @RequestMapping(value = Oadr20bUrlPath.EI_REGISTER_PARTY_SERVICE, method = RequestMethod.POST) @ResponseBody public String request(@RequestBody String payload, Principal principal) throws Oadr20bMarshalException, Oadr20bUnmarshalException, Oadr20bApplicationLayerException, Oadr20bXMLSignatureValidationException, Oadr20bXMLSignatureException, OadrSecurityException, IOException { return oadr20bVENEiRegisterPartyService.request(principal.getName(), payload); }  }
Oadr20bVENEiRegisterPartyController { @RequestMapping(value = Oadr20bUrlPath.EI_REGISTER_PARTY_SERVICE, method = RequestMethod.POST) @ResponseBody public String request(@RequestBody String payload, Principal principal) throws Oadr20bMarshalException, Oadr20bUnmarshalException, Oadr20bApplicationLayerException, Oadr20bXMLSignatureValidationException, Oadr20bXMLSignatureException, OadrSecurityException, IOException { return oadr20bVENEiRegisterPartyService.request(principal.getName(), payload); }  @RequestMapping(value = Oadr20bUrlPath.EI_REGISTER_PARTY_SERVICE, method = RequestMethod.POST) @ResponseBody String request(@RequestBody String payload, Principal principal); }
Oadr20bVENEiRegisterPartyController { @RequestMapping(value = Oadr20bUrlPath.EI_REGISTER_PARTY_SERVICE, method = RequestMethod.POST) @ResponseBody public String request(@RequestBody String payload, Principal principal) throws Oadr20bMarshalException, Oadr20bUnmarshalException, Oadr20bApplicationLayerException, Oadr20bXMLSignatureValidationException, Oadr20bXMLSignatureException, OadrSecurityException, IOException { return oadr20bVENEiRegisterPartyService.request(principal.getName(), payload); }  @RequestMapping(value = Oadr20bUrlPath.EI_REGISTER_PARTY_SERVICE, method = RequestMethod.POST) @ResponseBody String request(@RequestBody String payload, Principal principal);  }