Optimized Sinewave Test of Waveform Digitizers by a DFT Approach