Tests cover extractUserText with v5+ parts format, v4 content string, last-user-message extraction, simple text/prompt fields, null cases, and preference ordering. Stream listener tests verify text event translation and the writableEnded guard.