Why query params are not reaching the interface?
You're ignoring the result of the queryParam
method. The method doesn't modify the existing instance - it returns a new one, just like path
does. From the docs:
Create a new WebTarget instance by configuring a query parameter on the URI of the current target instance.
Just change your code to:
WebTarget target = webTarget.path("test").path("Testuser").queryParam("a", "a");