@Test @Order(5) public void testResign() { given() .pathParam("id", 1) .when().delete("/{id}") .then() .statusCode(204); given() .pathParam("id", 1) .when().get("/{id}") .then() .statusCode(404); }
@DELETE @Path("{id}") public Response resign(@PathParam("id") long id) { try { service.resign(id); return Response.noContent().build(); } catch (ApplicationException e) { throw new WebApplicationException(404); } }
EmployeeResource { @DELETE @Path("{id}") public Response resign(@PathParam("id") long id) { try { service.resign(id); return Response.noContent().build(); } catch (ApplicationException e) { throw new WebApplicationException(404); } } }
EmployeeResource { @DELETE @Path("{id}") public Response resign(@PathParam("id") long id) { try { service.resign(id); return Response.noContent().build(); } catch (ApplicationException e) { throw new WebApplicationException(404); } }  }
EmployeeResource { @DELETE @Path("{id}") public Response resign(@PathParam("id") long id) { try { service.resign(id); return Response.noContent().build(); } catch (ApplicationException e) { throw new WebApplicationException(404); } }  @GET @Path("all") @Produces("application/json") List<Employee> getAll(); @GET @Path("{id}") @Produces("application/json") Employee get(@PathParam("id") long id); @POST Response register(@QueryParam("name") String name, @Context UriInfo uriInfo); @DELETE @Path("{id}") Response resign(@PathParam("id") long id); }
EmployeeResource { @DELETE @Path("{id}") public Response resign(@PathParam("id") long id) { try { service.resign(id); return Response.noContent().build(); } catch (ApplicationException e) { throw new WebApplicationException(404); } }  @GET @Path("all") @Produces("application/json") List<Employee> getAll(); @GET @Path("{id}") @Produces("application/json") Employee get(@PathParam("id") long id); @POST Response register(@QueryParam("name") String name, @Context UriInfo uriInfo); @DELETE @Path("{id}") Response resign(@PathParam("id") long id);  }