  @Test
  public void testLookupWithQuery() throws UnsupportedEncodingException {

    HelloService svc = new HelloServiceImpl("stuff");
    ProxyHelper.registerService(HelloService.class, vertx, svc, "address");

    Record record1 = EventBusService.createRecord("Hello", "address", HelloService.class,
      new JsonObject().put("key", "foo"));
    Record record2 = EventBusService.createRecord("Hello-2", "address", HelloService.class,
      new JsonObject().put("key", "bar"));

    discovery.publish(record1, (r) -> {
    });
    discovery.publish(record2, (r) -> {
    });

    await().until(() -> record1.getRegistration() != null);
    await().until(() -> record2.getRegistration() != null);


    JsonArray services =
      given()
        .param("query", "{\"name\":\"Hello\"}")
        .get("/discovery")
        .asJsonArray();

    assertThat(services.size()).isEqualTo(1);
  }