@Test
public void testGetAudioFileFormatWithUnbufferedFlacStream() throws IOException, UnsupportedAudioFileException {

    final FlacAudioFileReader flacAudioFileReader = new FlacAudioFileReader();
    final File flacTestFile = getFlacTestFile("cymbals.flac");
    InputStream in = null;
    try {
        in = new FileInputStream(flacTestFile);
        assertFalse("For this test the stream MUST NOT support mark()", in.markSupported());
        flacAudioFileReader.getAudioFileFormat(in);
        fail("Expected an IOException, because the stream didn't support mark. See AudioSystem#getAudioFileFormat(InputStream stream) javadocs for contract");
    } catch (IOException e) {
        // expected this
    } finally {
        if (in != null) {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}