public void testManyFormats() throws IOException {
        // Get the directory holding our test files
        File testFilesDir = new File(getClass().getResource(testVorbisFile).getFile()).getParentFile();

        // Check each one
        int validFiles = 0;
        for (File file : testFilesDir.listFiles()) {
            String filename = file.getName();
            if (filename.startsWith("test") && 
                    filename.contains(".")) {
                // Work out if we expect it to pass or not
                String extension = filename.substring(filename.lastIndexOf('.')+1);
                boolean isOgg = ! NON_OGG_EXTENSIONS.contains(extension);

                // Try opening it
                try {
                    OggFile ogg = new OggFile(new FileInputStream(file));
                    OggPacketReader r = ogg.getPacketReader();

                    // Ensure we can process the file
                    int packets = 0;
                    while (r.getNextPacket() != null && packets <= 2000) {
                        packets++;
                    }
                    assertTrue("Bogus packets found in " + filename, packets < 1750);

                    // Check that it worked for the right reason
                    if (isOgg) {
                        assertTrue("No packets found in " + filename, packets >= 1);
                        validFiles ++;
                    } else {
                        if (packets == 0) {
                            // Good, non-ogg file shouldn't have any
                        } else {
                            fail("Non Ogg file processed " + filename);
                        }
                    }
                } catch (Exception e) {
                    if (isOgg) {
                        fail("Error processing Ogg file " + filename + "\n" + e);
                    } else {
                        // Not an Ogg file, so this is correct
                    }
                }
            } else {
                // Not a test file, ignore
            }
        }

        assertTrue("Not enough files, found " + validFiles, validFiles >= 4);
    }