public String build() {
        return build(null, Maps.<String, Object>newHashMap());
    }
@Test
    public void testFromInstance() {
        ServiceInstanceBuilder<Void> builder = new ServiceInstanceBuilder<Void>();
        builder.address("1.2.3.4");
        builder.name("foo");
        builder.id("bar");
        builder.port(5);
        builder.sslPort(6);
        builder.registrationTimeUTC(789);
        builder.serviceType(ServiceType.PERMANENT);
        ServiceInstance<Void> instance = builder.build();

        UriSpec spec = new UriSpec(
                "{scheme}://{address}:{port}:{ssl-port}/{name}/{id}/{registration-time-utc}/{service-type}");

        Map<String, Object> m = Maps.newHashMap();
        m.put("scheme", "test");
        assertEquals(spec.build(instance, m), "test://1.2.3.4:5:6/foo/bar/789/permanent");
    }