Is $X_{T}=\int_{0}^{T}\left(T-t\right)dB_{t}$ process is a martingale in the natural filtration of $B$, where $B$ is a Brownian motion?
I would say it is not a martingale, since $$X_{T}=\int_{0}^{T}TdB_{t}+\int_{0}^{T}\left(-t\right)dB_{t}=TB_{T}+\int_{0}^{T}\left(-t\right)dB_{t}.$$
The second part: $\int_{0}^{T}\left(-t\right)dB_{t}$ is definitely a martingale, but if we decompose the $TB_{T}$ process with the Ito-formula, we get:$$TB_{T}=\int_{0}^{T}B_{t}dt+\int_{0}^{T}tdB_{t},$$ but $\int_{0}^{T}B_{t}dt$ is not a martingale, so $X$ can't be either.
However, I think $\left(T-t\right)$ is progressive measurable, and $$\mathbb{E}\left(\int_{0}^{T}\left(T-t\right)^{2}dt\right)<\infty\;\;\;\forall T,$$ so according to this, it would yield that $X$ should be a martingale. What do I miss here?
Anyway, $\left(T-t\right)$ isn't a "nice" integrand either. It seems like it is a 2-variable integrand and I don't know how to handle them.What is the correct condition to check if a a stochastic integrale (where the integrator is a Brownian motion) is martingale in this (“2-variable”) case?
It seems to me that if $T_{1}\le T_{2}$ then \begin{multline*} X_{T_{2}} =\int_{0}^{T_{2}}\left(T_{2}-T_{1}\right)dB_{t} +\int_{0}^{T_{2}}\left(T_{1}-t\right)dB_{t} =\left(T_{2}-T_{1}\right)B_{T_{2}}+X_{T_{1}} +\int_{T_{1}}^{T_{2}}\left(T_{1}-t\right)dB_{t} \end{multline*} and, taking expectations, $$ \mathbb{E}\left(X_{T_{2}}\mid \mathcal{F}_{T_{1}}\right) =X_{T_{1}}+\left(T_{2}-T_{1}\right)B_{T_{1}}+0.$$ That second term makes me think not a martingale.
$(T-t)$ I would not call a process at all, hence the problem applying your theorem from progressive measurability.