@Test
public void test_stop_task() {

    TaskManager.MonitorableFutureTask<String> dummyTask = taskManager.startTask(() -> {
        Thread.sleep(10000);
        return "ok";
    });
    put("/api/task/stop/" + dummyTask).should().respond(200).contain("true");
    assertThat(taskManager.getTask(dummyTask.toString()).isCancelled()).isTrue();
    get("/api/task/all").should().respond(200).contain("\"state\":\"CANCELLED\"");
}