code: protected Long extractId(URI uri) {
          String uriStr = uri.toString();
          return Long.valueOf(uriStr.substring(uriStr.lastIndexOf("/") + 1));
      }
docs: Extracts the id of the resource specified in the response body from a
  POST call.
  
  @param uri The URI.
  @return the id of the resource.