### Question:
ServerLobby { public synchronized void broadcastMessage(String message) { if(message == null) { log.error("Attempted to broadcast null message."); return; } log.debug(message); for(ServerLobbyListener listener : listeners) { listener.lobbyChatMessage(new LobbyChatEvent(this, message)); } } ServerLobby(String serverName, int maxRobots, int maxUsers); synchronized void addLobbyStateListener(ServerLobbyListener listener); synchronized void removeLobbyStateListener(ServerLobbyListener listener); synchronized boolean addUserProxy(UserProxy userProxy); synchronized void removeUserProxy(UserProxy userProxy); synchronized boolean registerRobot(RobotProxy robot); synchronized void unregisterRobot(RobotProxy robot); synchronized void broadcastMessage(String message); synchronized void broadcastUserStateUpdate(UserProxy userProxy); synchronized void setGameType(GameType newType); boolean gameInProgress(); GameController getCurrentGame(); GameType getCurrentGameType(); synchronized RobotProxy getRobotProxy(String identifier); synchronized boolean isUsernameRegistered(String username); String getServerName(); synchronized void launchGame(); synchronized void endCurrentGame();  }### Answer:
@Test public void testBroadcastMessage() { testLobby.broadcastMessage("Test Message"); assertEquals(1, testListener.getNumEvents()); assertEquals("Test Message", testListener.getLastChatEvent().getMessage()); testListener.clearNumEvents(); testLobby.broadcastMessage(null); assertEquals(0, testListener.getNumEvents()); }