    @Test
    public void testReplaceParamsFromUser(TestContext testContext) {

        Multimap<String, String> params = ArrayListMultimap.create();

        Multimap<String, String> headers = ArrayListMultimap.create();

        JsonObject jsonObject = new JsonObject();

        ApiContext apiContext =
                ApiContext.create(HttpMethod.GET, "/devices", headers, params, jsonObject);
        apiContext.setPrincipal(new JsonObject()
                                        .put("u1", new JsonArray().add("u1.1").add("u1.2"))
                                        .put("u2", "u2")
                                        .put("obj", new JsonObject().put("foo", "bar")));

        HttpRpcRequest httpRpcRequest = SimpleHttpRequest.create(UUID.randomUUID().toString(),
                                                                 "add_device")
                .setHost("localhost")
                .setPort(8080)
                .setHttpMethod(HttpMethod.POST)
                .setPath("/")
                .addParam("foo", "bar")
                .addParam("q1", "$user.u1")
                .addParam("q2", "$user.u2")
                .addParam("q3", "$user.u3")
                .addParam("q4", "$user.obj");
        apiContext.addRequest(httpRpcRequest);

        Filter filter =
                Filter.create(HttpRequestReplaceFilter.class.getSimpleName(), vertx,
                              new JsonObject());
        filters.add(filter);

        Task<ApiContext> task = Task.create();
        task.complete(apiContext);
        Async async = testContext.async();
        Filters.doFilter(task, filters)
                .andThen(context -> {
                    System.out.println(context.requests());
                    testContext.assertEquals(1, context.requests().size());
                    HttpRpcRequest request = (HttpRpcRequest) context.requests().get(0);
                    testContext.assertEquals("localhost", request.host());
                    testContext.assertEquals(8080, request.port());
                    System.out.println(request.params());
                    testContext.assertEquals(5, request.params().size());
                    testContext.assertEquals(2, request.params().get("q1").size());
                    testContext.assertEquals("bar", request.params().get("foo").iterator().next());
                    testContext.assertEquals("u1.1", request.params().get("q1").iterator().next());
                    testContext.assertEquals("u2", request.params().get("q2").iterator().next());
                    testContext
                            .assertEquals("{\"foo\":\"bar\"}", request.params().get("q4").iterator
                                    ().next());
                    async.complete();
                }).onFailure(t -> {
            t.printStackTrace();
            testContext.fail();
        });

    }