### Question:
FruitResource { @DELETE @Path("{id}") public void delete(@PathParam long id) { fruitRepository.deleteById(id); } FruitResource(FruitRepository fruitRepository); @GET @Produces("application/json") Iterable<Fruit> findAll(); @DELETE @Path("{id}") void delete(@PathParam long id); @POST @Path("/name/{name}/color/{color}") @Produces("application/json") Fruit create(@PathParam String name, @PathParam String color); @PUT @Path("/id/{id}/color/{color}") @Produces("application/json") Fruit changeColor(@PathParam Long id, @PathParam String color); @GET @Path("/color/{color}") @Produces("application/json") List<Fruit> findByColor(@PathParam String color);  }### Answer:
@Test void testListAllFruits() { given() .when().get("/fruits") .then() .statusCode(200) .body( containsString("Cherry"), containsString("Apple"), containsString("Banana")); given() .when().delete("/fruits/1") .then() .statusCode(204); given() .when().get("/fruits") .then() .statusCode(200) .body( not(containsString("Cherry")), containsString("Apple"), containsString("Banana")); given() .when().post("/fruits/name/Orange/color/Orange") .then() .statusCode(200) .body(containsString("Orange")) .body("id", notNullValue()) .extract().body().jsonPath().getString("id"); given() .when().get("/fruits") .then() .statusCode(200) .body( not(containsString("Cherry")), containsString("Apple"), containsString("Orange")); }