Adaptive tests for stochastic processes in the ergodic case