try {
restTemplate.getForObject(BASE_URL + "task/delete/{taskId}", TaskTO.class, 0);
} catch (HttpStatusCodeException e) {
assertEquals(HttpStatus.NOT_FOUND, e.getStatusCode());
}
TaskExecTO execution = restTemplate.postForObject(BASE_URL + "task/execute/{taskId}", null, TaskExecTO.class, 1);
assertEquals(PropagationTaskExecStatus.SUBMITTED.name(), execution.getStatus());
execution = restTemplate.getForObject(BASE_URL + "task/execution/report/{executionId}"
+ "?executionStatus=SUCCESS&message=OK", TaskExecTO.class, execution.getId());
assertEquals(PropagationTaskExecStatus.SUCCESS.name(), execution.getStatus());
assertEquals("OK", execution.getMessage());
restTemplate.getForObject(BASE_URL + "task/delete/{taskId}", PropagationTaskTO.class, 1);
try {
restTemplate.getForObject(BASE_URL + "task/execution/read/{executionId}", TaskExecTO.class,
execution.getId());
} catch (HttpStatusCodeException e) {
assertEquals(HttpStatus.NOT_FOUND, e.getStatusCode());
}
}