class TableMetadataResource {

    @POST
    public Table save(@Valid final Table table) {
        try {
            tableMetadataManager.save(table);
        } catch (Exception e) {
            logger.error(String.format("Unable to save table %s", table), e);
            throw new WebApplicationException(Response.serverError().entity(Collections.singletonMap("error", e.getMessage())).build());
        }
        return table;
    }

    public  TableMetadataResource(TableMetadataManager tableMetadataManager);

}