code: @SuppressWarnings("rawtypes")
      protected RESTBaseElementV1<?> getEntity(final Object entity) {
          if (entity instanceof ProxyObject) {
              final MethodHandler handler = ((ProxyObject) entity).getHandler();
              if (handler instanceof RESTBaseEntityV1ProxyHandler) {
                  return ((RESTBaseEntityV1ProxyHandler) handler).getEntity();
              }
          }
  
          return (RESTBaseElementV1<?>) entity;
      }
docs: Get the non proxied version of a REST Entity.
  
  @param entity The possible proxied entity.
  @return The unwrapped/non-proxy entity, or the original entity if it wasn't a proxy.