@Override @GET @Path("/workitem/getallwithstatus/{statusName}") public Response getAllWorkItemsWithStatus(@PathParam("statusName") final String statusName) { try { List<WorkItem> workItems = ticketSystemService.getAllWorkItemsWithStatus(statusName); return Response.status(200).entity(gson.toJson(workItems)).build(); } catch (final TicketSystemServiceException exception) { return Response.status(400).entity(exception).build(); } }