code: public Registration register (Class type, Serializer serializer) {
  		Registration registration = classResolver.getRegistration(type);
  		if (registration != null) {
  			registration.setSerializer(serializer);
  			return registration;
  		}
  		return classResolver.register(new Registration(type, serializer, getNextRegistrationId()));
  	}
docs: Registers the class using the lowest, next available integer ID and the specified serializer. If the class is already
  registered, the existing entry is updated with the new serializer. Registering a primitive also affects the corresponding
  primitive wrapper.
  <p>
  Because the ID assigned is affected by the IDs registered before it, the order classes are registered is important when
  using this method. The order must be the same at deserialization as it was for serialization.