$f(X_n)$ converges in probability to $f(X)$ implies $X_n$ converges in probability to $X$ Show that $(X_n)_n$ converges in probability to $X$ if and only if for every continuous function $f$ with compact support, $f(X_n)$ converges in probability to $f(X).$
$\implies$ is very easy, the problem is with the converse. Any suggestions to begin?
 A: Use functions of the form $$f_M(x)=\begin{cases}0 & x\leq -M \\ x+M & -M \leq x \leq M \\ 3M-x & M < x < 3M \\ 0 & x\geq 3M\end{cases}$$ for $M>0$.
Then $$\begin{align*}\mathbb{P}[|X_n-X|>3\varepsilon] &\leq \mathbb{P}[|X_n+M-f_M(X_n)|>\varepsilon] + \mathbb{P}[|f_M(X_n)-f_M(X)|>\varepsilon] + \mathbb{P}[|f_M(X)-X-M|>\varepsilon] \\ &\leq \mathbb{P}[|X_n|>M] + \mathbb{P}[|f_M(X_n)-f_M(X)|>\varepsilon] + \mathbb{P}[|X|>M]\end{align*}$$
Of the terms in the last line, the last is small for $M>M_0$ and the middle is small for $n>n_0(M,\varepsilon)$.  The only term we have to be careful with is the first term.
This is where our choice of class of functions matters and where my previous answer failed.  Using the assumption that $f_M(X_n)\xrightarrow{\mathbb{P}}f_M(X)$ for all $M>0$ we can control that first term, but I'll leave that to you.
A: We will make use of the following simple observations:

Lemma 1. $X_n \to X$ in probability if and only if $\mathbb{E}[|X_n-X|\wedge1] \to 0$.

Proof. This easily follows from the inequality
$$ 
\epsilon \mathbb{P}(|X_n-X|>\epsilon)
\leq \mathbb{E}[|X_n-X|\wedge1]
\leq \epsilon + \mathbb{P}(|X_n-X|>\epsilon)
$$
which holds for any $\epsilon \in (0, 1)$.

Lemma 2. If $(X_n)$ is pointwise bounded by an integrable r.v. $Y$ and converges in probability to $X$, then
$$ \lim_{n\to\infty} \mathbb{E}[X_n] = \mathbb{E}[X]. $$

Proof. For any subsequence of $(X_n)$, there exists a further subsequence $X_{n_k}$ which converges a.s. to $X$. Then by the Dominated Convergence Theorem, $\mathbb{E}[X_{n_k}]\to\mathbb{E}[X]$. This implies the desired claim.

Returning to OP's question, fix $0<a<b$ and $\chi, \varphi \in C_c(\mathbb{R})$ such that $\mathbf{1}_{[-a,a]} \leq \chi \leq \mathbf{1}_{[-b,b]}$ on all of $\mathbb{R}$ and $\varphi(x) = x$ on $[-b, b]$. Then we find that
$$ \mathbb{P}(|X_n| > b)
= 1 - \mathbb{E}[\mathbf{1}_{[-b,b]}(X_n)]
\leq 1 - \mathbb{E}[\chi(X_n)] $$
and
\begin{align*}
&(|X_n - X|\wedge 1)\mathbf{1}_{\{|X_n|\leq b\}\cap\{|X|\leq b\}} \\
&= (|\varphi(X_n) - \varphi(X)|\wedge 1)\mathbf{1}_{\{|X_n|\leq b\}\cap\{|X|\leq b\}} \\
&\leq |\varphi(X_n) - \varphi(X)|.
\end{align*}
Using this, we may bound $\mathbb{E}[|X_n - X|\wedge 1]$ from above as follows:
\begin{align*}
\mathbb{E}[|X_n - X|\wedge 1]
&\leq \mathbb{E}[(|X_n - X|\wedge1) \mathbf{1}_{\{|X_n|\leq b\}\cap\{|X|\leq b\}}] + \mathbb{P}(|X_n|>b) + \mathbb{P}(|X|>b) \\
&\leq \mathbb{E}[|\varphi(X_n) - \varphi(X)|] + (1 - \mathbb{E}[\chi(X_n)]) + \mathbb{P}(|X|>b).
\end{align*}
Taking $\limsup$ as $n\to\infty$ and applying Lemma 1 and 2,
\begin{align*}
\limsup_{n\to\infty} \mathbb{E}[|X_n - X|\wedge 1]
&\leq (1 - \mathbb{E}[\chi(X)]) + \mathbb{P}(|X|>b) \\
&\leq \mathbb{P}(|X|>a)+\mathbb{P}(|X|>b).
\end{align*}
Since this limsup is independent of $a$ and $b$, letting $b\to\infty$ followed by $a\to\infty$ shows that the limsup is zero, or equivalently,
$$ \lim_{n\to\infty} \mathbb{E}[|X_n - X|\wedge 1] = 0. $$
Therefore the desired conclusion follows by Lemma 1.
