@Ignore("For manual testing only")
@Test
public void pureNoiseTest() {

	double[] data = testDataGenerator.createNoisySeasonalDataWithTimeSeed(144, 12, 0.0, 0.0, 1.0);
	SeasonalTrendLoess.Builder builder = new SeasonalTrendLoess.Builder().setPeriodLength(12).setSeasonalWidth(7).setRobust();
	SeasonalTrendLoess smoother = builder.buildSmoother(data);
	SeasonalTrendLoess.Decomposition stl = smoother.decompose();
	double[] trend = stl.getTrend();
	double[] seasonal = stl.getSeasonal();
	double[] residuals = stl.getResidual();
	double rsum = 0.0;
	double r2sum = 0.0;
	double dsum = 0.0;
	double d2sum = 0.0;
	double tsum = 0.0;
	double t2sum = 0.0;
	double ssum = 0.0;
	double s2sum = 0.0;
	for (int i = 0; i < data.length; ++i) {
		final double r = residuals[i];
		rsum += r;
		r2sum += r * r;
		final double d = data[i];
		dsum += d;
		d2sum += d * d;
		final double t = trend[i];
		tsum += t;
		t2sum += t * t;
		final double s = seasonal[i];
		ssum += s;
		s2sum += s * s;
	}
	double trendMean = tsum / data.length;
	double trendVar = (t2sum - trendMean * trendMean) / (data.length - 1);
	double resMean = rsum / data.length;
	double resVar = (r2sum - resMean * resMean) / (data.length - 1);
	double dataMean = dsum / data.length;
	double dataVar = (d2sum - dataMean * dataMean) / (data.length - 1);
	double seasonalMean = ssum / data.length;
	double seasonalVar = (s2sum - seasonalMean * seasonalMean) / (data.length - 1);
	final double stlMean = seasonalMean + trendMean + resMean;
	assertEquals(dataMean, stlMean, 1.0e-8);
	final double stlVar = seasonalVar + trendVar + resVar;
	System.out.println("     \t\tmean\tvariance");
	System.out.println(String.format("data     \t%f\t%f", dataMean, dataVar));
	System.out.println(String.format("seasonal \t%f\t%f", seasonalMean, seasonalVar));
	System.out.println(String.format("trend    \t%f\t%f", trendMean, trendVar));
	System.out.println(String.format("residual \t%f\t%f", resMean, resVar));
	System.out.println(String.format("stl sum  \t%f\t%f", stlMean, stlVar));
}