### Question:
MessageParser { static TablePanelStatus getTableStatus(final String loginName, final List<String> params) { final TablePanelStatus status = new TablePanelStatus(); status.setLoginName(loginName); status.setMaxPlayers(Integer.parseInt(params.get(0))); for (int i = 0; i < status.getMaxPlayers(); i++) { if (!".".equals(params.get(i * 10 + 5))) { final PlayerStatus playerStatus = parsePlayerStatus(params .subList(i * 10 + 5, i * 10 + 16)); if (".".equals(params.get(i + 1))) { playerStatus.setPlayerLeft(true); } status.addPlayer(playerStatus.getName(), playerStatus); } } return status; }    }### Answer:
@Test public void testParseTableUpdatePlayerLeft() { final String tableUpdate = "table .4 foo state 3 foo . . . foo . 0 0 0 0 0 0 1 0 xskat $ 2 1 83 157 0 0 1 0 xskat:2 $ 0 0 0 0 0 0 1 0 . . 0 0 0 0 0 0 0 0 false 0"; final StringTokenizer token = new StringTokenizer(tableUpdate); token.nextToken(); token.nextToken(); final String creator = token.nextToken(); token.nextToken(); final List<String> detailParams = new ArrayList<>(); while (token.hasMoreTokens()) { detailParams.add(token.nextToken()); } final TablePanelStatus status = MessageParser.getTableStatus(creator, detailParams); assertThat(status.getMaxPlayers()).isEqualTo(3); assertThat(status.getPlayerInformations()).hasSize(3); final PlayerStatus playerStatus = status.getPlayerInformation("xskat"); assertNotNull(playerStatus); assertThat(playerStatus.getGamesPlayed()).isEqualTo(2); assertThat(playerStatus.getGamesWon()).isEqualTo(1); assertThat(playerStatus.getLastGameResult()).isEqualTo(83); assertThat(playerStatus.getTotalPoints()).isEqualTo(157); assertTrue(playerStatus.isPlayerLeft()); assertFalse(playerStatus.isReadyToPlay()); assertTrue(playerStatus.isTalkEnabled()); }