  In this paper, we develop Bayes and maximum a posteriori probability (MAP)
approaches to monotonicity testing. In order to simplify this problem, we
consider a simple white Gaussian noise model and with the help of the Haar
transform we reduce it to the equivalent problem of testing positivity of the
Haar coefficients. This approach permits, in particular, to understand links
between monotonicity testing and sparse vectors detection, to construct new
tests, and to prove their optimality without supplementary assumptions. The
main idea in our construction of multi-level tests is based on some invariance
properties of specific probability distributions. Along with Bayes and MAP
tests, we construct also adaptive multi-level tests that are free from the
prior information about the sizes of non-monotonicity segments of the function.
