@Test public void shouldReturnEmptyMasterName() { CollaborativeRoom nullCollaborativeRoom = Mockito.spy(new CollaborativeRoom(null)); Assert.assertTrue(nullCollaborativeRoom.getMasterName().isEmpty()); }
public String getMasterName() { return (master==null)?"":master.getUserPrincipal().getName(); }
CollaborativeRoom { public String getMasterName() { return (master==null)?"":master.getUserPrincipal().getName(); } }
CollaborativeRoom { public String getMasterName() { return (master==null)?"":master.getUserPrincipal().getName(); } CollaborativeRoom(Session master); }
CollaborativeRoom { public String getMasterName() { return (master==null)?"":master.getUserPrincipal().getName(); } CollaborativeRoom(Session master); static CollaborativeRoom getByKeyName(String roomKey); static Set<CollaborativeRoom> getAllCollaborativeRooms(); String getLastMaster(); void setLastMaster(String lastMaster); @Override String toString(); JsonObject getContext(); void put(); void delete(); Session getMaster(); String getMasterName(); void setMaster(Session master); String getKey(); void setKey(String key); List<Session> getSlaves(); void addSlave(Session slave); boolean removeSlave(Session slave); List<String> getPendingUsers(); void addPendingUser(String user); boolean removePendingUser(String user); Date getCreationDate(); Session findUserSession(String user); JsonObject getCommands(); void saveCommand(JsonObject command); }
CollaborativeRoom { public String getMasterName() { return (master==null)?"":master.getUserPrincipal().getName(); } CollaborativeRoom(Session master); static CollaborativeRoom getByKeyName(String roomKey); static Set<CollaborativeRoom> getAllCollaborativeRooms(); String getLastMaster(); void setLastMaster(String lastMaster); @Override String toString(); JsonObject getContext(); void put(); void delete(); Session getMaster(); String getMasterName(); void setMaster(Session master); String getKey(); void setKey(String key); List<Session> getSlaves(); void addSlave(Session slave); boolean removeSlave(Session slave); List<String> getPendingUsers(); void addPendingUser(String user); boolean removePendingUser(String user); Date getCreationDate(); Session findUserSession(String user); JsonObject getCommands(); void saveCommand(JsonObject command);  }