Testing for finite expectation The mean of a positive random variable $X$ is either finite or infinite; define $J(X)$ to be $0$ in the former case and $1$ in the latter case. Claim: there does not exist a function $J_n$ from the iid sample of size $n$ to $\{0,1\}$ such that
$J_n\to J(X)$ in probability.
This claim (which is undoubtedly true) appears to be folklore knowledge among statisticians, but I have not been able to find a formal proof in the literature. The closest result I could find is the one by
Hawkins, which proves the impossibility of a sequential test with finite stopping time.
Can anyone give a pointer to a book/paper where the folklore claim is formally proven?
This seems to be addressed in the following paper by Joseph P. Romano, Section 3  [1] (specifically, Example 1):

Example 1 (Finite versus not finite mean). Let $X$ be $X_1, \dots, X_n$, $n$ i.i.d. observations on the real line. As remarked by Bahadur &amp; Savage (1956), &quot;it would be interesting to know whether, in comparable non-parametric situations, tests of the existence of $\mu$ are equally unsuccessful&quot;; here, $\mu$ refers to the mean of an observation. So, let $P_0$ be the family of distributions on the real line with a finite mean, and let $P_1$ be the distributions without a finite mean. Condition B readily holds. [...] Hence, the conclusion of theorem 1 holds, and so it is impossible to construct a test with power greater than the size of the test.

[1] Romano, Joseph P. “On Non-Parametric Testing, the Uniform Behaviour of the t-Test, and Related Problems.” Scandinavian Journal of Statistics, vol. 31, no. 4, 2004, pp. 567–584. JSTOR, www.jstor.org/stable/4616851. Accessed 15 Sept. 2020.