for (int i = 0; i < files.length; i++) {
AudioFile file = AudioFileIO.read(files[i]);
file.getTag().setTrack("do not modify");
AudioFileIO.write(file);
}
TrackEnumerator te = new TrackEnumerator();
te.getSettings().setSaveRun(true);
te.getSettings().setFiles(new File[] {parent.copyDir});
File cantwork = new File(parent.copyDir, "CantWork.ogg");
assertTrue(cantwork.createNewFile());
int processed = te.process(false);
assertTrue(processed < 0);
for (int i = 0; i < files.length; i++) {
AudioFile file = AudioFileIO.read(files[i]);
assertTrue("Tag written despite errornous file.", file.getTag()
.getFirstTrack().equals("do not modify"));