public Instance build() {
        Instance result = actualBuilder.build();
        for (InstanceExtensionHandler each : handlers) {
            each.handleExtensionInfo(result);
        }
        setInstanceId(result);
        return result;
    }
@Test
    void testBuild() {
        Instance actual = builder.setServiceName("g@@s").setBeatInfo(beatInfo).build();
        assertThat(actual.getServiceName(), is("g@@s"));
        assertThat(actual.getIp(), is("1.1.1.1"));
        assertThat(actual.getPort(), is(8848));
        assertThat(actual.getClusterName(), is("c"));
        assertThat(actual.getWeight(), is(10.0));
        assertTrue(actual.isEphemeral());
        assertTrue(actual.isEnabled());
        assertTrue(actual.isHealthy());
        assertThat(actual.getInstanceId(), is("1.1.1.1#8848#c#g@@s"));
        assertThat(actual.getMetadata().size(), is(1));
        assertThat(actual.getMetadata().get("mock"), is("mock"));
        verify(request).getParameter("mock");
    }