@Override
    @TpsControl(pointName = "RemoteNamingInstanceBatchRegister", name = "RemoteNamingInstanceBatchRegister")
    @Secured(action = ActionTypes.WRITE)
    @ExtractorManager.Extractor(rpcExtractor = BatchInstanceRequestParamExtractor.class)
    public BatchInstanceResponse handle(BatchInstanceRequest request, RequestMeta meta) throws NacosException {
        Service service = Service.newService(request.getNamespace(), request.getGroupName(), request.getServiceName(),
                true);
        InstanceUtil.batchSetInstanceIdIfEmpty(request.getInstances(), service.getGroupedServiceName());
        switch (request.getType()) {
            case NamingRemoteConstants.BATCH_REGISTER_INSTANCE:
                return batchRegisterInstance(service, request, meta);
            default:
                throw new NacosException(NacosException.INVALID_PARAM,
                        String.format("Unsupported request type %s", request.getType()));
        }
    }
@Test
    void testHandle() throws NacosException {
        BatchInstanceRequest batchInstanceRequest = new BatchInstanceRequest();
        batchInstanceRequest.setType(NamingRemoteConstants.BATCH_REGISTER_INSTANCE);
        batchInstanceRequest.setServiceName("service1");
        batchInstanceRequest.setGroupName("group1");
        List<Instance> instanceList = new ArrayList<>();
        Instance instance = new Instance();
        instanceList.add(instance);
        batchInstanceRequest.setInstances(instanceList);
        RequestMeta requestMeta = new RequestMeta();
        batchInstanceRequestHandler.handle(batchInstanceRequest, requestMeta);
        Mockito.verify(clientOperationService).batchRegisterInstance(Mockito.any(), Mockito.any(), Mockito.anyString());
        batchInstanceRequest.setType("google");
        try {
            batchInstanceRequestHandler.handle(batchInstanceRequest, requestMeta);
        } catch (Exception e) {
            assertEquals(NacosException.INVALID_PARAM, ((NacosException) e).getErrCode());
        }
    }