public List<Instance> generateInstancesByIps(String serviceName, String rawProductName, String clusterName,
            String[] ipArray) {
        if (StringUtils.isEmpty(serviceName) || StringUtils.isEmpty(clusterName) || ipArray == null
                || ipArray.length == 0) {
            return Collections.emptyList();
        }
        
        List<Instance> instanceList = new ArrayList<>(ipArray.length);
        for (String ip : ipArray) {
            String[] ipAndPort = generateIpAndPort(ip);
            Instance instance = new Instance();
            instance.setIp(ipAndPort[0]);
            instance.setPort(Integer.parseInt(ipAndPort[1]));
            instance.setClusterName(clusterName);
            instance.setServiceName(serviceName);
            instance.setEphemeral(false);
            instance.getMetadata().put("app", rawProductName);
            instance.getMetadata().put("tenant", Constants.DEFAULT_NAMESPACE_ID);
            instanceList.add(instance);
        }
        
        return instanceList;
    }
@Test
    void testGenerateInstancesByIps() {
        AddressServerGeneratorManager manager = new AddressServerGeneratorManager();
        final List<Instance> empty = manager.generateInstancesByIps(null, null, null, null);
        assertNotNull(empty);
        assertTrue(empty.isEmpty());
    
        String[] ipArray = new String[]{"192.168.3.1:8848", "192.168.3.2:8848", "192.168.3.3:8848"};
        final List<Instance> instanceList = manager.generateInstancesByIps("DEFAULT_GROUP@@nacos.as.test", "test", "test",
                ipArray);
        assertNotNull(instanceList);
        assertFalse(instanceList.isEmpty());
        assertEquals(3, instanceList.size());
    
        final Instance instance1 = instanceList.get(0);
        assertEquals("192.168.3.1", instance1.getIp());
    
        final Instance instance2 = instanceList.get(1);
        assertEquals("192.168.3.2", instance2.getIp());
    
        final Instance instance3 = instanceList.get(2);
        assertEquals("192.168.3.3", instance3.getIp());
    
    }