docs: @SuppressWarnings("unchecked")
    public static <T> PersistentPortability<T> persistent(final Portability<T> normal) {
      if (normal instanceof PersistentPortability<?>) {
        return (PersistentPortability<T>) normal;
      } else {
        LinkedHashSet<Class<?>> proxyInterfaces = new LinkedHashSet<>();
        for (Class<?> klazz = normal.getClass(); klazz != null; klazz = klazz.getSuperclass()) {
          proxyInterfaces.addAll(asList(klazz.getInterfaces()));
        }
        proxyInterfaces.add(PersistentPortability.class);
  
        return (PersistentPortability<T>) Proxy.newProxyInstance(normal.getClass().getClassLoader(), proxyInterfaces.toArray(new Class<?>[0]), (o, method, os) -> {
          if (method.getDeclaringClass().equals(Persistent.class)) {
            return null;
          } else {
            return method.invoke(normal, os);
          }
        });
      }
    }