### Question:
FruitResource { @GET @Path("/color/{color}") @Produces("application/json") public List<Fruit> findByColor(@PathParam String color) { return fruitRepository.findByColor(color); } 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 testFindByColor() { given() .when().get("/fruits/color/Black") .then() .statusCode(200) .body("size()", is(0)); given() .when().get("/fruits/color/Red") .then() .statusCode(200) .body( containsString("Apple"), containsString("Strawberry")); given() .when().get("/fruits/color/Green") .then() .statusCode(200) .body("size()", is(1)) .body(containsString("Avocado")); given() .when().put("/fruits/id/4/color/Black") .then() .statusCode(200) .body(containsString("Black")); given() .when().get("/fruits/color/Black") .then() .statusCode(200) .body("size()", is(1)) .body( containsString("Black"), containsString("Avocado")); }