@Override
    public String toString() {

      // Fixed length part: fields 0 to 3.
      String result =
          (date != null ? date.getTime() : NULL_STRING)
              + FIELD_SEPARATOR
              + (state != null ? state.name() : NULL_STRING)
              + FIELD_SEPARATOR
              + (action != null ? action.name() : NULL_STRING)
              + FIELD_SEPARATOR
              + (requestedAction != null ? requestedAction.name() : NULL_STRING)
              + FIELD_SEPARATOR;

      // Variable length part: fields 4 and following.
      if (payload != null) {
        for (int i = 0; i < payload.length; i++) {
          result +=
              (payload[i] != null ? manageFieldSeparator(payload[i].toString(), true) : NULL_STRING)
                  + FIELD_SEPARATOR;
        }
      }
      return result;
    }