code: @SneakyThrows(IOException.class)
      private Object writeReplace() throws ObjectStreamException {
          return new KeyVersionImpl.SerializedForm(SERIALIZER.serialize(this).getCopy());
      }
docs: /*
  The object returned by this method is serialized to the object stream. This method is invoked when
  {@link java.io.ObjectOutputStream} is preparing to write the object to the stream.