}
@Test
public void testFlacSortTags() throws IOException {
String filename = BaseTestCase.getTestResourceDiretory() + "org/socialmusicdiscovery/server/plugins/mediaimport/filesystem/testfile1withsort.flac";
TrackData data = new FlacTagReader(null).getTrackData(new File(filename));
assert data != null;
assert data.getFile().equals(filename);
assert data.getUrl().startsWith("file:/");
assert data.getUrl().endsWith("testfile1withsort.flac");
assert data.getFormat().equals("flc");
assert data.getSmdID().equals("fa05a51e838417f9ba57185973fd3ff8-000000d3");
assert data.getTags() != null;
assert data.getTags().size() == 10;
boolean foundAlbumArtist = false;
boolean foundArtist = false;
boolean foundPerformer = false;
boolean foundConductor = false;
boolean foundComposer = false;
boolean foundSong = false;
boolean foundGenre = false;
boolean foundAlbum = false;
for (TagData tagData : data.getTags()) {
if (tagData.getName().equals("ARTIST") && tagData.getValue().equals("The Artist") && tagData.getSortValue().equals("Artist, The")) {
foundArtist = true;
} else if (tagData.getName().equals("ALBUMARTIST") && tagData.getValue().equals("The Album Artist") && tagData.getSortValue().equals("Album Artist, The")) {
foundAlbumArtist = true;
} else if (tagData.getName().equals("PERFORMER") && tagData.getValue().equals("The Performer") && tagData.getSortValue().equals("Performer, The")) {