}
}
private void testRead(String file) {
Track track = getAudioFileReader(file).read(getFileFromResource(file));
TrackData trackData = track.getTrackData();
// test metadata fields
testMulti(ARTISTS, trackData.getTagFieldValues(FieldKey.ARTIST));
Assert.assertTrue(trackData.getTagFieldValues(FieldKey.ARTIST).contains(trackData.getArtist()));
testSingle(ALBUM_ARTIST, trackData.getAlbumArtist());
testSingle(TITLE, trackData.getTitle());
testSingle(ALBUM, trackData.getAlbum());
testSingle(YEAR, trackData.getYear());
testMulti(GENRES, trackData.getTagFieldValues(FieldKey.GENRE));
testMulti(GENRES, trackData.getGenres());
Assert.assertTrue(trackData.getGenres().contains(trackData.getGenre()));
testSingle(TRACK, trackData.getTrack());
testSingle(TRACK_TOTAL, trackData.getTrackTotal());
testSingle(DISC_NO, trackData.getDisc());
testSingle(DISC_TOTAL, trackData.getDiscTotal());
testMulti(RECORD_LABELS, trackData.getTagFieldValues(FieldKey.RECORD_LABEL));
testMulti(RECORD_LABELS, trackData.getRecordLabels());
Assert.assertTrue(trackData.getRecordLabels().contains(trackData.getRecordLabel()));
testMulti(CATALOG_NOS, trackData.getTagFieldValues(FieldKey.CATALOG_NO));
testMulti(CATALOG_NOS, trackData.getCatalogNos());
Assert.assertTrue(trackData.getCatalogNos().contains(trackData.getCatalogNo()));
testSingle(COMMENT, trackData.getComment());
// testSingle(RATING, trackData.getRating());
// test technical fields
// assertEquals(29400, track.getTotalSamples());
assertEquals(2, trackData.getChannels());
assertEquals(44100, trackData.getSampleRate());
}