Assert.assertNotNull(ts);
}
private int prepareTestdataForArtist() throws ApplicationException {
ArtistSimilarityParser asParser = new ArtistSimilarityParserImpl(
new ResourceUtil(CHER_SIMILAR_ARTISTS).getInputStream());
artistRelationDao.createArtistRelations(
asParser.getArtist(), asParser.getArtistRelations());
ArtistTopTracksParser attParser = new ArtistTopTracksParserImpl(
new ResourceUtil(CHER_TOP_TRACKS).getInputStream());
artistTopTracksDao.createTopTracks(
attParser.getArtist(), attParser.getTopTracks());
List<File> files = new ArrayList<>();
for (Track topTrack : attParser.getTopTracks()) {
files.add(UnittestLibraryUtil.getFile(topTrack));
}
UnittestLibraryUtil.submitFile(additionDao, files);
int artistId = musicDao.getArtistId(asParser.getArtist());
playlistGeneratorDao.updateSearchIndex();
return artistId;
}