JizzBroadcast broadcast2 = newBroadcast(station);
JizzDj dj1 = newDj(station);
JizzDj dj2 = newDj(station);
JizzSong songB1D1 = newSong(station, broadcast1, dj1);
JizzSong songB1D2 = newSong(station, broadcast1, dj2);
JizzSong songB2D1 = newSong(station, broadcast2, dj1);
JizzSong songB2D2 = newSong(station, broadcast2, dj2);
List<JizzSong> songsB1 = jizzSongJpaDao
.findSongsForBroadcast(broadcast1);
assertContainsSongs(songsB1,
new int[] { songB1D1.getId(), songB1D2.getId() });
List<JizzSong> songsB2 = jizzSongJpaDao
.findSongsForBroadcast(broadcast2);
assertContainsSongs(songsB2,
new int[] { songB2D1.getId(), songB2D2.getId() });
List<JizzSong> songsB1D1 = jizzSongJpaDao.findSongsForBroadcast(
broadcast1, dj1);
assertContainsSongs(songsB1D1, new int[] { songB1D1.getId() });
List<JizzSong> songsB1D2 = jizzSongJpaDao.findSongsForBroadcast(
broadcast1, dj2);
assertContainsSongs(songsB1D2, new int[] { songB1D2.getId() });
List<JizzSong> songsB2D1 = jizzSongJpaDao.findSongsForBroadcast(
broadcast2, dj1);
assertContainsSongs(songsB2D1, new int[] { songB2D1.getId() });
List<JizzSong> songsB2D2 = jizzSongJpaDao.findSongsForBroadcast(
broadcast2, dj2);
assertContainsSongs(songsB2D2, new int[] { songB2D2.getId() });
}