@Test
    public void testBogusFile() throws IOException {
        final String filename = "test.wav";
        final File file = File.createTempFile("testBogusFile", filename);
        FileOutputStream out = new FileOutputStream(file);
        final Random random = new Random();
        for (int i=0; i<8*1024; i++) {
            out.write(random.nextInt());
        }
        out.close();
        FFURLInputStream in = null;
        try {
            in = new FFURLInputStream(file.toURI().toURL());
            in.read(new byte[1024]);
            fail("Expected UnsupportedAudioFileException");
        } catch (UnsupportedAudioFileException e) {
            // expected this
            e.printStackTrace();
            assertTrue(e.toString().endsWith("(Operation not permitted)")
                    || e.toString().endsWith("(Invalid data found when processing input)")
                    || e.toString().endsWith("(End of file)")
                    || e.toString().endsWith("(Invalid data found when processing input)")
                    || e.toString().contains("Probe score too low")
            );
        } finally {
            if (in != null) {
                try {
                    in.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            file.delete();
        }
    }