@Test
    public void testNetworkingEncodeParseMessage() {
        LOGGER.log(Level.INFO, "----- STARTING TEST testNetworkingEncodeParseMessage -----");
        String client_hash = "";
        String server_hash = "";
        ArrayList<String> parameters = new ArrayList<String>();
        parameters.add("ACTION");
        parameters.add("PARAM1");
        parameters.add("PARAM2");
        String hash = "hash";
        game.handleAction(parameters, hash);
        replay(game);
        try {
            server1.startThread();
        } catch (IOException | ServerSocketCloseException | FeatureNotUsedException e) {
            exception = true;
        }
        waitListenThreadStart(server1);
        try {
            client_hash = server2.addSocket("127.0.0.1", port);
        } catch (IOException | TimeoutException e) {
            exception = true;
        }
        waitSocketThreadAddNotEmpty(server2);
        waitSocketThreadState(server2, client_hash, SocketThread.CONFIRMED);
        waitSocketThreadAddNotEmpty(server1);
        server_hash = getServerLastSocketHash(server1);
        try {
            server1.replaceHash(server_hash, hash);
        } catch (HashNotFoundException | InvalidArgumentException e) {
            exception = true;
        }
        boolean loop = true;
        Timing new_timer = new Timing();
        while (loop) {
            if (server1.containsHash(hash) || new_timer.getTime() > timeout) {
                loop = false;
            }
        }
        String action = "ACTION";
        ArrayList<String> action_parameters = new ArrayList<String>();
        action_parameters.add("PARAM1");
        action_parameters.add("PARAM2");
        server2.sendAction(action, action_parameters, client_hash);
        time.waitTime(wait + wait + wait);
        verify(game);
        LOGGER.log(Level.INFO, "----- TEST testNetworkingEncodeParseMessage COMPLETED -----");
    }