If $X$ and $Y$ are stochastically ordered, i.e. say $X\leq_{st.}Y$, then we have both $$\mathbb{E}(X)\leq \mathbb{E}Y\ \mbox{and}\ \mathbb{E}(f(X))\leq \mathbb{E}(f(Y))$$ where $f$ is a non-decreasing function.
Conversely, if for any non-decreasing function $f$ we have $$\mathbb{E}(f(X))\leq \mathbb{E}(f(Y))$$ then it follows that $X\leq_{st.}Y$ and consequently $\mathbb{E}(X)\leq \mathbb{E}(Y)$.
For more on stochastic ordering see here.