Goodness-of-Fit Tests for Dependent Data