@Test
    public void testSetListenThreadClient() {
        LOGGER.log(Level.INFO, "----- STARTING TEST testSetListenThreadClient -----");
        boolean flag1 = false;
        boolean flag2 = false;
        if (server2.getState() == Server.CLIENT) {
            flag1 = true;
        }
        if (flag1) {
            try {
                server2.setPort(23231);
            } catch (InvalidArgumentException e) {
                exception = true;
            }
            try {
                server2.setListenThread();
            } catch (IOException | ServerSocketCloseException | TimeoutException e) {
                exception = true;
            }
            if (server2.getState() == Server.LISTEN) {
                flag2 = true;
            }
        }
        Assert.assertFalse(exception, "Exception found");
        Assert.assertTrue(flag2, "Client server's state has not been set as listen Server. listen_thread may have not been created correctly. Server state is " + Integer.toString(server2.getState()));
        LOGGER.log(Level.INFO, "----- TEST testSetListenThreadClient COMPLETED -----");
    }