@@ -0,0 +1,1149 @@
+package nl.fifth.postulate.tools;%0A%0Aimport org.jtransforms.fft.DoubleFFT_1D;%0Aimport org.junit.Test;%0A%0Aimport java.util.Arrays;%0A%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.hamcrest.number.IsCloseTo.closeTo;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic class JTransformTest %7B%0A    private static final double EPSILON = 0.01;%0A%0A    @Test%0A    public void shouldDoAFFTTransform() %7B%0A        final double%5B%5D input = new double%5B%5D%7B 1.0f, 1.5f, 0.5f, 2.0f, 2.0f, 0.5f, 1.5f, 1.0f %7D;%0A        final double%5B%5D output = Arrays.copyOf(input, input.length);%0A        DoubleFFT_1D fft = new DoubleFFT_1D(output.length);%0A%0A        fft.realForward(output);%0A %0A        assertThat(output%5B0%5D, is(closeTo(10.00f, EPSILON)));%0A        assertThat(output%5B1%5D, is(closeTo( 0.00f, EPSILON)));%0A        assertThat(output%5B2%5D, is(closeTo(-1.00f, EPSILON)));%0A        assertThat(output%5B3%5D, is(closeTo(-0.41f, EPSILON)));%0A        assertThat(output%5B4%5D, is(closeTo( 1.00f, EPSILON)));%0A        assertThat(output%5B5%5D, is(closeTo( 1.00f, EPSILON)));%0A        assertThat(output%5B6%5D, is(closeTo(-1.00f, EPSILON)));%0A        assertThat(output%5B7%5D, is(closeTo(-2.41f, EPSILON)));%0A    %7D%0A%7D%0A

Test JTransform library