@Override
    public void batchRegisterInstance(String serviceName, String groupName, List<Instance> instances)
            throws NacosException {
        NamingUtils.batchCheckInstanceIsLegal(instances);
        batchCheckAndStripGroupNamePrefix(instances, groupName);
        clientProxy.batchRegisterService(serviceName, groupName, instances);
    }
@Test
    void testBatchRegisterInstanceWithWrongGroupNamePrefix() throws NacosException {
        Instance instance = new Instance();
        String serviceName = "service1";
        String ip = "1.1.1.1";
        int port = 10000;
        instance.setServiceName("WrongGroup" + "@@" + serviceName);
        instance.setEphemeral(true);
        instance.setPort(port);
        instance.setIp(ip);
        List<Instance> instanceList = new ArrayList<>();
        instanceList.add(instance);
        //when
        try {
            client.batchRegisterInstance(serviceName, Constants.DEFAULT_GROUP, instanceList);
        } catch (Exception e) {
            assertTrue(e instanceof NacosException);
            assertTrue(e.getMessage().contains("wrong group name prefix of instance service name"));
        }
    }