@Test
public void flatTrendTest() {

	long seed = 1234567L; // System.nanoTime() // change this to do random stress test
	double[] data = testDataGenerator.createNoisySeasonalData(144, 12, 1.0, 0.0, 0.1, seed);
	SeasonalTrendLoess.Builder builder = new SeasonalTrendLoess.Builder().setFlatTrend().setPeriodLength(12).setSeasonalWidth(1000000).setRobust();
	SeasonalTrendLoess smoother = builder.buildSmoother(data);
	SeasonalTrendLoess.Decomposition stl = smoother.decompose();
	double[] trend = stl.getTrend();
	for (int i = 1; i < trend.length; ++i)
		assertEquals(0.0, trend[i] - trend[i-1], 1.0e-13);
}