}
@Test
public void noAdjacentArtistsInPlaylist() {
List<PlaylistItem> ts = new ArrayList<>();
ts.add(new PlaylistItem(1, 1));
ts.add(new PlaylistItem(1, 2));
ts.add(new PlaylistItem(1, 3));
ts.add(new PlaylistItem(2, 4));
ts.add(new PlaylistItem(2, 5));
ts.add(new PlaylistItem(2, 6));
ts.add(new PlaylistItem(3, 7));
ts.add(new PlaylistItem(3, 8));
ts.add(new PlaylistItem(3, 9));
ts.add(new PlaylistItem(4, 10));
ts.add(new PlaylistItem(4, 11));
ts.add(new PlaylistItem(4, 12));
ts.add(new PlaylistItem(5, 13));
ts.add(new PlaylistItem(5, 14));
ts.add(new PlaylistItem(5, 15));
ts.add(new PlaylistItem(6, 16));
ts.add(new PlaylistItem(6, 17));
ts.add(new PlaylistItem(6, 18));
ts.add(new PlaylistItem(7, 19));
ts.add(new PlaylistItem(7, 20));
ts.add(new PlaylistItem(7, 21));
ts.add(new PlaylistItem(8, 22));
ts.add(new PlaylistItem(8, 23));
ts.add(new PlaylistItem(8, 24));
Random rnd = new Random(1258114665843L);
for (int i = 0; i < 1000; i++) {
Collections.shuffle(ts, rnd);
playlistGeneratorService.distributeArtists(ts);