@Test
public void testDoesNotSupportNon16BitInput() throws Exception {

  try {
    sonicAudioProcessor.configure(
        new AudioFormat(
            /* sampleRate= */ 44100, /* channelCount= */ 2, /* encoding= */ C.ENCODING_PCM_8BIT));
    fail();
  } catch (UnhandledAudioFormatException e) {
    // Expected.
  }
  try {
    sonicAudioProcessor.configure(
        new AudioFormat(
            /* sampleRate= */ 44100,
            /* channelCount= */ 2,
            /* encoding= */ C.ENCODING_PCM_24BIT));
    fail();
  } catch (UnhandledAudioFormatException e) {
    // Expected.
  }
  try {
    sonicAudioProcessor.configure(
        new AudioFormat(
            /* sampleRate= */ 44100,
            /* channelCount= */ 2,
            /* encoding= */ C.ENCODING_PCM_32BIT));
    fail();
  } catch (UnhandledAudioFormatException e) {
    // Expected.
  }
}