The paper deals with the constrained Bayesian Method (CBM) for testing composite hypotheses. It is shown that, similarly to the cases when CBM is optimal for testing simple and multiple hypotheses in parallel and sequential experiments, it keeps the optimal properties at testing composite hypotheses. In particular, it easily, without special efforts, overcomes the Lindley's paradox arising when testing a simple hypothesis versus a composite one. The CBM is compared with Bayesian test in the classical case and when the a priori probabilities are chosen in a special manner for overcoming the Lindley's paradox. Superiority of CBM against these tests is demonstrated by simulation. The justice of the theoretical judgment is supported by many computation results of different characteristics of the considered methods.