@Test
    public void testServerClose() {
        LOGGER.log(Level.INFO, "----- STARTING TEST testServerClose -----");
        try {
            server1.startThread();
        } catch (IOException | ServerSocketCloseException | FeatureNotUsedException e) {
            exception = true;
        }
        waitListenThreadStart(server1);
        boolean flag1 = false;
        boolean flag2 = false;
        if (server1.getListenThread().getRun()) {
            flag2 = true;
        }
        if (flag2) {
            try {
                server1.close();
            } catch (IOException | ServerSocketCloseException | TimeoutException e) {
                exception = true;
            }
            waitServerState(server1, Server.CLOSED);
            if (!server1.getListenThread().getRun()) {
                flag1 = true;
            }
        }
        Assert.assertFalse(exception, "Exception found");
        Assert.assertTrue(flag1, "Server not closed as a listen server");
        LOGGER.log(Level.INFO, "----- TEST testServerClose COMPLETED -----");
    }