LiveVideos { public void remove(String mediaLabel) { int index = searchLiveVideoIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } } LiveVideos(MediaPlayer player); LiveVideo add(String mediaLabel); LiveVideo add(String mediaLabel, String mediaTheme1); LiveVideo add(String mediaLabel, String mediaTheme1, String mediaTheme2); LiveVideo add(String mediaLabel, String mediaTheme1, String mediaTheme2, String mediaTheme3); void remove(String mediaLabel); void removeAll();  }
@Test public void removeTest() { LiveVideo v1 = liveVideos.add("name"); LiveVideo v2 = liveVideos.add("other"); liveVideos.add("lv3"); assertEquals(3, liveVideos.list.size()); liveVideos.remove("name"); assertEquals(2, liveVideos.list.size()); assertFalse(liveVideos.list.contains(v1)); assertTrue(liveVideos.list.contains(v2)); }