Nonparametric tests for the changepoint problem