@Test
    public void testServerClientDisconnectWithHash() {
        LOGGER.log(Level.INFO, "----- STARTING TEST testServerClientDisconnectWithHash -----");
        String client_hash = "";
        String server_hash = "";
        server1.setUseDisconnectedSockets(true);
        try {
            server1.startThread();
        } catch (IOException | ServerSocketCloseException | FeatureNotUsedException e) {
            exception = true;
        }
        waitListenThreadStart(server1);
        try {
            client_hash = server2.addSocket("127.0.0.1");
        } catch (IOException | TimeoutException e) {
            exception = true;
        }
        waitSocketThreadAddNotEmpty(server2);
        waitSocketThreadState(server2, client_hash, SocketThread.CONFIRMED);
        waitSocketThreadAddNotEmpty(server1);
        server_hash = getServerLastSocketHash(server1);
        waitSocketThreadState(server1, server_hash, SocketThread.CONFIRMED);
        try {
            server2.close();
        } catch (IOException | ServerSocketCloseException | TimeoutException e) {
            exception = true;
        }
        waitServerState(server2, Server.CLOSED);
        boolean loop = true;
        Timing new_timer = new Timing();
        while (loop) {
            if (!server1.getDisconnectedSockets().isEmpty() || new_timer.getTime() > timeout) {
                loop = false;
            }
        }
        Assert.assertFalse(server1.getDisconnectedSockets().isEmpty(), "Hash not added to disconnected_sockets");
        Assert.assertFalse(exception, "Exception found");
        Assert.assertEquals(server1.getDisconnectedSockets().get(0), server_hash, "Disconnected sockets hash not logged");
        LOGGER.log(Level.INFO, "----- TEST testServerClientDisconnectWithHash COMPLETED -----");
    }