@Test
public void testDeletePage() 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);
	assertEquals(2, getPlaylist(playlist.getId()).getPageReferences().size());
	playlistService.deletePage(playlist.getId(), playlist.getPageReferences().get(0).getId());
	assertEquals(1, getPlaylist(playlist.getId()).getPageReferences().size());
	assertEquals("p2", getPlaylist(playlist.getId()).getPageReferences().get(0).getPage().getName());
}