[TASK] Refactor functional tests migrated in #77381