Resampler { public Resampler(AudioFormat audioFormat) { setup(); setTargetParameters(audioFormat); } Resampler(AudioFormat audioFormat); void setTargetParameters(AudioFormat audioFormat); void setInputParameters(AudioFormat audioFormat); boolean resamplingRequired(); void resampleFrame(Frame frame); void resampleBuffer(ByteBuffer frameBuffer, int bufferLenght); int getTargetChannelCount(); int getTargetSampleRate(); int getInputChannelCount(); int getInputSampleRate(); boolean sampleRateSupported(int sampleRate);  }
@Test(expected = RuntimeException.class) public void canVerifyTargetChannelCount_ThrowRuntimeException() { AudioFormat format = create.audioFormat().withChannelCount(3).construct(); create.resampler().withTargetAudioFormat(format).construct(); }
@Test(expected = RuntimeException.class) public void canVerifyTargetSampleRate_ThrowRuntimeException() { AudioFormat format = create.audioFormat().withSampleRate(1).construct(); create.resampler().withTargetAudioFormat(format).construct(); }
@Test(expected = RuntimeException.class) public void canVerifyInputChannelCount_ThrowRuntimeException() { AudioFormat format = create.audioFormat().withChannelCount(3).construct(); create.resampler().withInputAudioFormat(format).construct(); }
@Test(expected = RuntimeException.class) public void canVerifyInputSampleRate_ThrowRuntimeException() { AudioFormat format = create.audioFormat().withSampleRate(1).construct(); create.resampler().withInputAudioFormat(format).construct(); }