code: public SerializerRegistry register(Class<?> type, TypeSerializerFactory factory) {
      return register(type, calculateTypeId(type), factory);
    }
docs: Registers a serializer for the given class.
  
  @param type The serializable class.
  @param factory The serializer factory.
  @return The serializer registry.
  @throws RegistrationException If the given {@code type} is already registered