code: public static <T, R extends Resource<T>> T getEntity(R resource) {
          return resource.getEntity();
      }
docs: Return the entity of a resource
  
  @param resource the resource
  @param <T>      the type of the resource's entity
  @param <R>      the resource type
  @return the resource's entity