@Test
  public void test_convert_with_metadata() {
    ServiceInstance service = new DefaultServiceInstance("test", "localhost", 80, false);
    service.getMetadata().put("health.path", "ping");
    service.getMetadata().put("management.context-path", "mgmt");
    service.getMetadata().put("management.port", "1234");

    Application application = new DefaultServiceInstanceConverter().convert(service);

    assertThat(application.getId(), nullValue());
    assertThat(application.getName(), is("test"));
    assertThat(application.getServiceUrl(), is("http://localhost:80"));
    assertThat(application.getManagementUrl(), is("http://localhost:1234/mgmt"));
    assertThat(application.getHealthUrl(), is("http://localhost:1234/mgmt/ping"));
  }