@Test public void addTwoTest() { assertEquals(189, mediaPlayers.add(189).getPlayerId()); assertEquals(189, mediaPlayers.add(189).getPlayerId()); assertEquals(1, mediaPlayers.players.size()); assertNotNull(mediaPlayers.players.get(189)); assertNull(mediaPlayers.players.get(1)); }
public MediaPlayer add() { int id = 0; do { id++; } while (players.get(id) != null); return add(id); }
MediaPlayers extends Helper { public MediaPlayer add() { int id = 0; do { id++; } while (players.get(id) != null); return add(id); } }
MediaPlayers extends Helper { public MediaPlayer add() { int id = 0; do { id++; } while (players.get(id) != null); return add(id); } MediaPlayers(Tracker tracker); }
MediaPlayers extends Helper { public MediaPlayer add() { int id = 0; do { id++; } while (players.get(id) != null); return add(id); } MediaPlayers(Tracker tracker); MediaPlayer add(); MediaPlayer add(int playerId); void remove(int playerId); void removeAll(); }
MediaPlayers extends Helper { public MediaPlayer add() { int id = 0; do { id++; } while (players.get(id) != null); return add(id); } MediaPlayers(Tracker tracker); MediaPlayer add(); MediaPlayer add(int playerId); void remove(int playerId); void removeAll();  }