public void commonTest() throws IOException {

        //Map<String, String> keys = new HashMap();

        String requestBody;
        HttpResponse execute;
        ResponseHandler<String> handler;
        String response;

        post.setHeader("address", "192.168.50.174");
        post.setHeader("port", "8100");
        post.setHeader("command", "addShard");
        requestBody = "Adding shard";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        handler = new BasicResponseHandler();
        response = handler.handleResponse(execute);

        System.out.println("Adding shard: " + response);

        for (int i = 0; i < 10; i ++){
            post.setHeader("key", "key" + i);
            post.setHeader("value", "value" + i);
            post.setHeader("command", "add");
            requestBody = "Adding value";
            post.setEntity(new StringEntity(requestBody));
            execute = client.execute(httpHost, post);
            handler = new BasicResponseHandler();
            response = handler.handleResponse(execute);

            assertEquals(response, "0");
        }

        post.setHeader("command", "clear");
        requestBody = "Clear Data Storage";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        handler = new BasicResponseHandler();
        response = handler.handleResponse(execute);

        assertEquals(response, "0");

        post.setHeader("address", "192.168.50.174");
        post.setHeader("port", "8200");
        post.setHeader("command", "addShard");
        requestBody = "Adding shard";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        handler = new BasicResponseHandler();
        response = handler.handleResponse(execute);

        System.out.println("Adding shard: " + response);

        for (int i = 0; i < 10; i ++){
            post.setHeader("key", "key" + i);
            post.setHeader("value", "value" + i);
            post.setHeader("command", "add");
            requestBody = "Adding value";
            post.setEntity(new StringEntity(requestBody));
            execute = client.execute(httpHost, post);
            handler = new BasicResponseHandler();
            response = handler.handleResponse(execute);

            assertEquals(response, "0");
        }

        post.setHeader("command", "clear");
        requestBody = "Clear Data Storage";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        handler = new BasicResponseHandler();
        response = handler.handleResponse(execute);

        assertEquals(response, "0");

        post.setHeader("address", "192.168.50.187");
        post.setHeader("port", "8100");
        post.setHeader("command", "addShard");
        requestBody = "Adding shard";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        handler = new BasicResponseHandler();
        response = handler.handleResponse(execute);

        System.out.println("Adding shard: " + response);

        for (int i = 0; i < 10; i ++){
            post.setHeader("key", "key" + i);
            post.setHeader("value", "value" + i);
            post.setHeader("command", "add");
            requestBody = "Adding value";
            post.setEntity(new StringEntity(requestBody));
            execute = client.execute(httpHost, post);
            handler = new BasicResponseHandler();
            response = handler.handleResponse(execute);

            assertEquals(response, "0");
        }

        post.setHeader("command", "clear");
        requestBody = "Clear Data Storage";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        handler = new BasicResponseHandler();
        response = handler.handleResponse(execute);

        assertEquals(response, "0");

        post.setHeader("address", "192.168.50.187");
        post.setHeader("port", "8200");
        post.setHeader("command", "addShard");
        requestBody = "Adding shard";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        handler = new BasicResponseHandler();
        response = handler.handleResponse(execute);

        System.out.println("Adding shard: " + response);

        for (int i = 0; i < 10; i ++){
            post.setHeader("key", "key" + i);
            post.setHeader("value", "value" + i);
            post.setHeader("command", "add");
            requestBody = "Adding value";
            post.setEntity(new StringEntity(requestBody));
            execute = client.execute(httpHost, post);
            handler = new BasicResponseHandler();
            response = handler.handleResponse(execute);

            assertEquals(response, "0");
        }

        post.setHeader("command", "clear");
        requestBody = "Clear Data Storage";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        handler = new BasicResponseHandler();
        response = handler.handleResponse(execute);

        assertEquals(response, "0");

        /*post.setHeader("address", "192.168.50.174");
        post.setHeader("port", "8100");
        post.setHeader("command", "addShard");
        requestBody = "Adding shard";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        Handler = new BasicResponseHandler();
        response = Handler.handleResponse(execute);

        System.out.println("Adding shard: " + response);

        post.setHeader("address", "192.168.50.174");
        post.setHeader("port", "8200");
        post.setHeader("command", "addShard");
        requestBody = "Adding shard";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        Handler = new BasicResponseHandler();
        response = Handler.handleResponse(execute);

        System.out.println("Adding shard: " + response);

        post.setHeader("address", "192.168.50.187");
        post.setHeader("port", "8100");
        post.setHeader("command", "addShard");
        requestBody = "Adding shard";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        Handler = new BasicResponseHandler();
        response = Handler.handleResponse(execute);

        System.out.println("Adding shard: " + response);

        post.setHeader("address", "192.168.50.187");
        post.setHeader("port", "8200");
        post.setHeader("command", "addShard");
        requestBody = "Adding shard";
        post.setEntity(new StringEntity(requestBody));
        execute = client.execute(httpHost, post);
        Handler = new BasicResponseHandler();
        response = Handler.handleResponse(execute);

        System.out.println("Adding shard: " + response);

        for (int i = 0; i < 1000; i ++){
            String key = UUID.randomUUID().toString();
            String value = "val" + i;
            keys.put(key, value);
            post.setHeader("key", key);
            post.setHeader("value", value);
            post.setHeader("command", "add");
            requestBody = "Adding value";
            post.setEntity(new StringEntity(requestBody));
            execute = client.execute(httpHost, post);
            Handler = new BasicResponseHandler();
            response = Handler.handleResponse(execute);

            assertEquals(response, "0");
        }

        Set <String> keysSet = keys.keySet();
        for (String key : keysSet){
            post.setHeader("key", key);
            post.setHeader("value", keys.get(key) + "new");
            post.setHeader("command", "edit");
            requestBody = "editing value";
            post.setEntity(new StringEntity(requestBody));
            execute = client.execute(httpHost, post);
            Handler = new BasicResponseHandler();
            response = Handler.handleResponse(execute);

            assertEquals(response, "0");
        }

        for (String key : keysSet){
            post.setHeader("key", key);
            post.setHeader("command", "get");
            requestBody = "getting value";
            post.setEntity(new StringEntity(requestBody));
            execute = client.execute(httpHost, post);
            Handler = new BasicResponseHandler();
            response = Handler.handleResponse(execute);

            assertEquals(response, keys.get(key) + "new");
        }

        for (String key : keysSet){
            post.setHeader("key", key);
            post.setHeader("command", "del");
            requestBody = "deleting value";
            post.setEntity(new StringEntity(requestBody));
            execute = client.execute(httpHost, post);
            Handler = new BasicResponseHandler();
            response = Handler.handleResponse(execute);

            assertEquals(response, "0");
        }*/
    }