### Question:
FFTFilterEngineForExport extends SinglechannelSampleFilterEngine { @Override public void getSamples(double[] target, int signalOffset, int count, int arrayOffset) { double[] samples = new double[count]; source.getSamples(samples, signalOffset, count, 0); FourierTransform fourierTransform = new FourierTransform(fftSampleFilter.getWindowType(), fftSampleFilter.getWindowParameter()); Complex[] samplesFFT = fourierTransform.forwardFFT(samples); FFTSinglechannelSampleFilter.multiplyFFTByFFTSampleFilter(samplesFFT, fftSampleFilter, source.getSamplingFrequency()); double[] filteredSignal = fourierTransform.inverseFFT(samplesFFT); if (overlapBuffer != null) { for (int i = 0; i < overlapBuffer.length; i++) { filteredSignal[i] += overlapBuffer[i]; } } System.arraycopy(filteredSignal, 0, target, 0, count); overlapBuffer = new double[filteredSignal.length - count]; System.arraycopy(filteredSignal, count, overlapBuffer, 0, overlapBuffer.length); } FFTFilterEngineForExport(SampleSource source, FFTSampleFilter filter); @Override void getSamples(double[] target, int signalOffset, int count, int arrayOffset); @Override SampleFilterDefinition getFilterDefinition();  }### Answer:
@Test public void testFiltering() { int channelCount = 2; int sampleCount = 100; double[][] originalSamples = new double[channelCount][sampleCount]; for (int channel = 0; channel < channelCount; channel++) for (int i = 0; i < sampleCount; i++) originalSamples[channel][i] = Math.random(); DoubleArraySampleSource sampleSource = new DoubleArraySampleSource(originalSamples, channelCount, sampleCount); ChannelSelectorSampleSource channelOneSampleSource = new ChannelSelectorSampleSource(sampleSource, 0); FFTSampleFilter fftFilter = new FFTSampleFilter(true); fftFilter.setRange(fftFilter.new Range(50.0F, 128.0F, 0.0)); FFTFilterEngineForExport engine = new FFTFilterEngineForExport(channelOneSampleSource, fftFilter); double[] filteringResult = new double[sampleCount]; engine.getSamples(filteringResult, 0, sampleCount, 0); }