@Test public void testCreatePlaylist() throws Exception { String playlistName = randomPlaylistName(); log.info("\n\n\n\n\n\n\n create playlist named "+playlistName+"\n\n\n\n\n\n\n\n\n"); Playlist originalPlaylist = (Playlist)manager.send(new CreatePlaylist(new MemoryStore(), user, playlistName, false)); log.info("\n\n\n\n\n\n\n load playlist with UUID "+Hex.toHex(originalPlaylist.getByteUUID())+"\n\n spotify:user:"+ username + ":playlist:" + SpotifyURI.toURI(Hex.toHex(originalPlaylist.getByteUUID())) +"\n\n\n\n\n\n\n\n\n"); MemoryStore store = new MemoryStore(); Playlist loadedPlaylist = store.getPlaylist(originalPlaylist.getByteUUID()); manager.send(new LoadPlaylist(store, loadedPlaylist)); assertTrue("different stores means different instances", loadedPlaylist != originalPlaylist); assertEquals(loadedPlaylist.getChecksum().longValue(), loadedPlaylist.calculateChecksum()); assertEquals(originalPlaylist.getId(), loadedPlaylist.getId()); }
public CreatePlaylist(Store store, String playlistName, boolean collaborative) { this.store = store; this.playlistName = playlistName; this.collaborative = collaborative; }
CreatePlaylist extends Command<Playlist> { public CreatePlaylist(Store store, String playlistName, boolean collaborative) { this.store = store; this.playlistName = playlistName; this.collaborative = collaborative; } }
CreatePlaylist extends Command<Playlist> { public CreatePlaylist(Store store, String playlistName, boolean collaborative) { this.store = store; this.playlistName = playlistName; this.collaborative = collaborative; } CreatePlaylist(Store store, String playlistName, boolean collaborative);  CreatePlaylist(Store store, User user, String playlistName, boolean collaborative); }
CreatePlaylist extends Command<Playlist> { public CreatePlaylist(Store store, String playlistName, boolean collaborative) { this.store = store; this.playlistName = playlistName; this.collaborative = collaborative; } CreatePlaylist(Store store, String playlistName, boolean collaborative);  CreatePlaylist(Store store, User user, String playlistName, boolean collaborative); @Override Playlist send(DespotifyManager connectionManager); }
CreatePlaylist extends Command<Playlist> { public CreatePlaylist(Store store, String playlistName, boolean collaborative) { this.store = store; this.playlistName = playlistName; this.collaborative = collaborative; } CreatePlaylist(Store store, String playlistName, boolean collaborative);  CreatePlaylist(Store store, User user, String playlistName, boolean collaborative); @Override Playlist send(DespotifyManager connectionManager);  }