We consider two problems. The first one is of two simple hypotheses testing and the second problem is the testing of simple hypothesis against a composite local alternative for the model of inhomogeneous Poisson processes. In both problems we construct the asymptotically optimal tests and describe the behaviour of errors using large deviation principle and the asymptotic expansion technique.