}
@Test
public void test8KhzSource() throws DataProcessingException,
URISyntaxException {
AudioFileDataSource dataSource = ConfigurationManager
.getInstance(AudioFileDataSource.class);
// Test simple WAV.
File file = new File(getClass().getResource("test8k.wav").toURI());
dataSource.setAudioFile(file, null);
assertThat(dataSource.getData(), instanceOf(DataStartSignal.class));
Data d = dataSource.getData();
assertThat(dataSource.getData(), instanceOf(DoubleData.class));
assertThat(((DoubleData) d).getSampleRate(), equalTo(8000));
while ((d = dataSource.getData()) instanceof DoubleData);
assertThat(d, instanceOf(DataEndSignal.class));
}