@Test public void messageWithNoRSUsOrSDWShouldReturnWarning() { ResponseEntity<String> actualResponse = testTimDepositController .postTim("{\"request\":{},\"tim\":{\"timeStamp\":\"2018-03-13T01:07:11-05:00\"}}"); assertEquals( "{\"warning\":\"Warning: TIM contains no RSU, SNMP, or SDW fields. Message only published to broadcast streams.\"}", actualResponse.getBody()); }
@PostMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> postTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.POST); }
TimDepositController { @PostMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> postTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.POST); } }
TimDepositController { @PostMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> postTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.POST); } @Autowired  TimDepositController(OdeProperties odeProperties); }
TimDepositController { @PostMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> postTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.POST); } @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 { @PostMapping(value = "/tim", produces = "application/json") @CrossOrigin public ResponseEntity<String> postTim(@RequestBody String jsonString) { return depositTim(jsonString, ServiceRequest.OdeInternal.RequestVerb.POST); } @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);  }