We propose an optimal test procedure for testing the marginal density functions of a class of nonlinear diffusion processes. The proposed test is not only an optimal one but also avoids undersmoothing. An adaptive test is constructed, and its asymptotic properties are investigated. To show the asymptotic properties, we establish some general results for moment inequalities and asymptotic distributions for strictly stationary processes under the alpha-mixing condition. These results are applicable to some other estimation and testing of strictly stationary processes with the alpha-mixing condition. An example of implementation is given to demonstrate that the proposed model specification procedure is applicable to economic and financial model specification and can be implemented in practice. To ensure the applicability and implementation, we propose a computer-intensive simulation scheme for the choice of a suitable bandwidth involved in the kernel estimation and also a simulated critical value for the proposed adaptive test. Our finite sample studies support both the proposed theory and the simulation procedure.