@Test
public void testCopyPlaylist() throws Exception {

	Page page1 = pageService.createPage(new Page("p1"));
	Page page2 = pageService.createPage(new Page("p2"));
	Playlist playlist = new Playlist("d1");
	playlist.addPageReference(new PageReference(page1));
	playlist.addPageReference(new PageReference(page2));
	playlist = playlistService.createPlaylist(playlist);
	PageReference pageUpdate = new PageReference();
	pageUpdate.setPageDisplayDurationOverride(99);
	playlistService.updatePageReference(getPlaylist(playlist.getId()).getPageReferences().get(0).getId(),
			pageUpdate);
	Playlist copy = playlistService.copyPlaylist(playlist.getId(), new Playlist("d2"));
	List<Playlist> playlists = getPlaylists(false);
	assertEquals(2, playlists.size());
	assertEquals("d2", playlists.get(1).getName());
	assertEquals(copy.getId(), playlists.get(1).getId());
	assertEquals(2, playlists.get(1).getPageReferences().size());
	assertEquals(99, playlists.get(1).getPageReferences().get(0).getPageDisplayDurationOverride());
}