code: public Value map(final Object value, final boolean isObservable) throws ObjectToIdMappingException {
          if (isObservable) {
              return new Value(objectRegistry.getIdOrFail(value));
          } else {
              return new Value(value);
          }
      }
docs: Maps observable or simple objects to {@link Value} messages.
  
  @param value
  The observed value to map.
  @param isObservable
  If the value is an observable object or a simple object
  @return The message.
  @throws ObjectToIdMappingException
  When <code>value</code> wraps an <em>observable object</em> which has not been assigned an id yet.