@Test
    public void testReplaceHashNotExist() {
        LOGGER.log(Level.INFO, "----- STARTING TEST testReplaceHashNotExist -----");
        String client_hash = "";
        String server_hash = "";
        String server_hash_new = "";
        try {
            server1.setUseMessageQueues(true);
        } catch (TimeoutException e) {
            exception = 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);
        waitMessageQueueAddNotEmpty(server1);
        waitMessageQueueState(server1, server_hash, MessageQueue.RUNNING);
        server1.replaceHash(server_hash, "TEST");
        for (SocketThread socket : server1.getSocketList().values()) {
            server_hash_new = socket.getHash();
        }
        Assert.assertFalse(exception, "Exception found");
        Assert.assertEquals(server_hash_new, "TEST", "SocketThread not moved to the correct hash");
        Assert.assertFalse(server1.containsHash(server_hash), "Old hash not removed from list");
        LOGGER.log(Level.INFO, "----- TEST testReplaceHashNotExist COMPLETED -----");
    }