### Question:
TableInputResource implements Resource<TableInput> { @POST @Path("/update") @Consumes(Constants.APPLICATION_JSON_RESOURCE_PATH) @Produces(Constants.APPLICATION_JSON_RESOURCE_PATH) @Override public TableInput update(TableInput tableInput) { try { HibernateUtil.update(tableInput); return tableInput; } catch (Exception e) { e.printStackTrace(); throw new WebException(e, Response.Status.BAD_REQUEST); } }  @POST @Path(Constants.STORE_RESOURCE_PATH) @Produces(Constants.APPLICATION_JSON_RESOURCE_PATH) @Consumes(Constants.APPLICATION_JSON_RESOURCE_PATH) @Override TableInput store(TableInput table); @DELETE @Path("/delete/{id}") @Override void delete(@PathParam("id") long id); @GET @Path("/get/{id}") @Produces(Constants.APPLICATION_JSON_RESOURCE_PATH) @Override TableInput get(@PathParam("id") long id); @GET @Produces(Constants.APPLICATION_JSON_RESOURCE_PATH) @SuppressWarnings(Constants.SUPPRESS_WARNINGS_UNCHECKED) @Override List<TableInput> getAll(); @POST @Path("/update") @Consumes(Constants.APPLICATION_JSON_RESOURCE_PATH) @Produces(Constants.APPLICATION_JSON_RESOURCE_PATH) @Override TableInput update(TableInput tableInput);  }### Answer:
@Test public void testUpdate() throws EntityStorageException { HibernateUtil.clear(); TableInput tableInput = new TableInput("tableInput").setTableName("old name"); TableInput actualTableInput = tableInputResource.store(tableInput); assertEquals(tableInput, actualTableInput); tableInput.setComment("new comment").setTableName("new name"); tableInputResource.update(tableInput); actualTableInput = tableInputResource.get(tableInput.getId()); assertEquals(tableInput, actualTableInput); HibernateUtil.clear(); }