### Question:
TimeslotResource { @DELETE @Path("{timeslotId}") public Response delete(@PathParam("timeslotId") Long timeslotId) { Timeslot timeslot = Timeslot.findById(timeslotId); if (timeslot == null) { return Response.status(Response.Status.NOT_FOUND).build(); } timeslot.delete(); return Response.status(Response.Status.OK).build(); }  @GET List<Timeslot> getAllTimeslots(); @POST Response add(Timeslot timeslot); @DELETE @Path("{timeslotId}") Response delete(@PathParam("timeslotId") Long timeslotId);  }### Answer:
@Test void addAndRemove() { Timeslot timeslot = given() .when() .contentType(ContentType.JSON) .body(new Timeslot(DayOfWeek.SUNDAY, LocalTime.of(20, 0), LocalTime.of(21, 0))) .post("/timeslots") .then() .statusCode(202) .extract().as(Timeslot.class); given() .when() .delete("/timeslots/{id}", timeslot.getId()) .then() .statusCode(200); }