@Override
    public void executor(final Collection<URIRegisterDTO> dataList) {
        if (CollectionUtils.isEmpty(dataList)) {
            return;
        }
        final Map<String, List<URIRegisterDTO>> groupByRpcType = dataList.stream()
                .filter(data -> StringUtils.isNotBlank(data.getRpcType()))
                .collect(Collectors.groupingBy(URIRegisterDTO::getRpcType));
        for (Map.Entry<String, List<URIRegisterDTO>> entry : groupByRpcType.entrySet()) {
            final String rpcType = entry.getKey();
            Optional.ofNullable(shenyuClientRegisterService.get(rpcType))
                    .ifPresent(service -> {
                        final List<URIRegisterDTO> list = entry.getValue();
                        Map<String, List<URIRegisterDTO>> listMap = buildData(list);
                        listMap.forEach((selectorName, uriList) -> {
                            final List<URIRegisterDTO> register = new LinkedList<>();
                            final List<URIRegisterDTO> offline = new LinkedList<>();
                            for (URIRegisterDTO d : uriList) {
                                final EventType eventType = d.getEventType();
                                if (Objects.isNull(eventType) || EventType.REGISTER.equals(eventType)) {
                                    // eventType is null, should be old versions
                                    register.add(d);
                                } else if (EventType.OFFLINE.equals(eventType)) {
                                    offline.add(d);
                                }
                            }
                            if (CollectionUtils.isNotEmpty(register)) {
                                service.registerURI(selectorName, register);
                            }
                            if (CollectionUtils.isNotEmpty(offline)) {
                                service.offline(selectorName, offline);
                            }
                        });
                    });
        }
    }
@Test
    public void testExecutor() {
        List<URIRegisterDTO> list = new ArrayList<>();
        uriRegisterExecutorSubscriber.executor(list);
        assertTrue(list.isEmpty());
        list.add(URIRegisterDTO.builder().rpcType(RpcTypeEnum.HTTP.getName())
                .appName("test").contextPath("/test").build());
        ShenyuClientRegisterService service = mock(ShenyuClientRegisterService.class);
        when(shenyuClientRegisterService.get(any())).thenReturn(service);
        uriRegisterExecutorSubscriber.executor(list);
        verify(service).registerURI(any(), any());
    }