implement query and make test Server configurable