String urlString;
Protocol protocol;
Content content;
Parser parser;
Parse parse;
urlString = "file:" + sampleDir + fileSeparator + id3v2;
protocol = ProtocolFactory.getProtocol(urlString);
content = protocol.getContent(urlString);
parser = ParserFactory.getParser(content.getContentType(), urlString);
parse = parser.getParse(content);
Properties metadata = parse.getData().getMetadata();
assertEquals("postgresql comment id3v2", metadata.getProperty("COMM-Text"));
assertEquals("postgresql composer id3v2", metadata.getProperty("TCOM-Text"));
assertEquals("02", metadata.getProperty("TRCK-Text"));
assertEquals("http://localhost/", metadata.getProperty("WCOP-URL Link"));
assertEquals("postgresql artist id3v2", metadata.getProperty("TPE1-Text"));
assertEquals("(28)", metadata.getProperty("TCON-Text"));
assertEquals("2004", metadata.getProperty("TYER-Text"));
assertEquals("postgresql title id3v2", metadata.getProperty("TIT2-Text"));
assertEquals("postgresql album id3v2", metadata.getProperty("TALB-Text"));
assertEquals("postgresql encoded by id3v2", metadata.getProperty("TENC-Text"));
assertEquals("postgresql title id3v2 - "
+ "postgresql album id3v2 - "
+ "postgresql artist id3v2", parse.getData().getTitle());
assertEquals("http://localhost/", parse.getData().getOutlinks()[0].getToUrl());
}