@Test
    public void tryCrashedClient() {
        long timeout = 200;
        try {
            final Server server;
            server = new Server(PORT);
            ServerConnectionHandlerThread.serverModel = new ServerModel();
            Thread t = new Thread(new Runnable() {
                @Override
                public void run() {
                    server.serve();
                }

            });
            t.start();

            String username1 = "dennis";
            String username2 = "adorne";
            Socket socket1 = new Socket(HOST, PORT);
            Thread.sleep(timeout);
            Socket socket2 = new Socket(HOST, PORT);

            BufferedReader in = new BufferedReader(new InputStreamReader(
                    socket2.getInputStream()));

            ClientModel clientModel1 = new ClientModel(socket1);
            ClientModel clientModel2 = new ClientModel(socket2);

            clientModel1.requestUser(username1);
            Thread.sleep(timeout);
            clientModel2.requestUser(username2);
            
            // Now that everything is ready, disconnect user2. 
            // This should, in theory, cause the serverModel to remove
            // this user from its list of online users. 
            socket2.close();

            // give some time for the server to notice
            Thread.sleep(timeout);
            Thread.sleep(1000);

            // Now check whether the serverModel has adapted!
            assert !ServerConnectionHandlerThread.serverModel
                    .isUserLoggedIn(username2);

            server.stop();
            t.stop();

            Thread.sleep(timeout);

        } catch (Exception e) {
            System.out.println(e.toString());
            assert false;
        }
    }