TrendCycleFilterFactory { public static SymmetricFilter makeTrendFilter(final int frequency) { if (frequency % 2 == 0) return FilterFactory.makeSymmetricFilter(2, frequency); else return FilterFactory.makeSymmetricFilter(frequency); } private  TrendCycleFilterFactory(); static SymmetricFilter defaultHendersonFilterForFrequency(
	    final int frequency); static SymmetricFilter makeHendersonFilter(int length); static SymmetricFilter makeTrendFilter(final int frequency);  }
@Test public void testMakeTrendFilter() { for (int i = 1; i < 100; ++i) { SymmetricFilter filter = TrendCycleFilterFactory.makeTrendFilter(i); DataBlock w = new DataBlock(filter.getWeights()); assertTrue(Math.abs(w.sum() - 1) < 1e-9); } }