@Test public void testSuccessfulMessageReturnsSuccessMessagePut(@Capturing XmlUtils capturingXmlUtils) { ResponseEntity<String> actualResponse = testTimDepositController.putTim( "{\"request\":{\"rsus\":[],\"snmp\":{}},\"tim\":{\"msgCnt\":\"13\",\"timeStamp\":\"2017-03-13T01:07:11-05:00\"}}"); assertEquals("{\"success\":\"true\"}", actualResponse.getBody()); }
@PutMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> putTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.PUT); }
TimDepositController { @PutMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> putTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.PUT); } }
TimDepositController { @PutMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> putTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.PUT); } @Autowired  TimDepositController(OdeProperties odeProperties); }
TimDepositController { @PutMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> putTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.PUT); } @Autowired  TimDepositController(OdeProperties odeProperties); synchronized ResponseEntity<String> depositTim(String jsonString, RequestVerb verb); @PutMapping(value = "/tim", produces = "application/json") @CrossOrigin ResponseEntity<String> putTim(@RequestBody String jsonString); @PostMapping(value = "/tim", produces = "application/json") @CrossOrigin ResponseEntity<String> postTim(@RequestBody String jsonString); }
TimDepositController { @PutMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> putTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.PUT); } @Autowired  TimDepositController(OdeProperties odeProperties); synchronized ResponseEntity<String> depositTim(String jsonString, RequestVerb verb); @PutMapping(value = "/tim", produces = "application/json") @CrossOrigin ResponseEntity<String> putTim(@RequestBody String jsonString); @PostMapping(value = "/tim", produces = "application/json") @CrossOrigin ResponseEntity<String> postTim(@RequestBody String jsonString);  }