@Override @GET @Path("/user/getall/{page}/{amount}") public Response getAllUsers(@PathParam("page") int page, @PathParam("amount") int amount) { try { final Page<User> users = ticketSystemService.getAllUsers(page, amount); return Response.status(200).entity(gson.toJson(users.getContent())).build(); } catch (final TicketSystemServiceException exception) { return Response.status(400).entity(exception).build(); } }