TaskResource { @Operation(description = "Delete task") @DELETE @Path("{id}") public void deleteTask(@PathParam("id") Integer id) { taskService.delete(id); } TaskResource(TaskService taskService, MetricRegistry metricRegistry); @Operation(summary = "Get single task by id", description = "Get single task by id") @GET @Path("{id}") Response getTask(@PathParam("id") Integer id); @Operation(description = "Add task") @POST Response addTask(Task task); @Operation(description = "Get all tasks") @GET @Produces(MediaType.APPLICATION_JSON) Collection<Task> getTasks(); @Operation(description = "Change task") @PUT @Path("{id}") void updateTask(@PathParam("id") Integer id, Task task); @Operation(description = "Delete task") @DELETE @Path("{id}") void deleteTask(@PathParam("id") Integer id);  }
@Test public void testDelete() { taskRes.deleteTask(1); verify(taskService).delete(1); }