public static String generateInstanceId(Instance instance) {
        String instanceIdGeneratorType = instance.getInstanceIdGenerator();
        if (StringUtils.isBlank(instanceIdGeneratorType)) {
            instanceIdGeneratorType = Constants.DEFAULT_INSTANCE_ID_GENERATOR;
        }
        return INSTANCE.getInstanceIdGenerator(instanceIdGeneratorType).generateInstanceId(instance);
    }
@Test
    void testGenerateInstanceId() {
        Instance instance = new Instance();
        instance.setServiceName("service");
        instance.setClusterName("cluster");
        instance.setIp("1.1.1.1");
        instance.setPort(1000);
        assertThat(InstanceIdGeneratorManager.generateInstanceId(instance), is("1.1.1.1#1000#cluster#service"));
    }