@Override
    protected URIRegisterDTO buildURIRegisterDTO(final ApplicationContext context, final Map<String, Object> beans) {
        try {
            return URIRegisterDTO.builder()
                    .contextPath(getContextPath())
                    .appName(getAppName())
                    .protocol(protocol)
                    .host(super.getHost())
                    .port(Integer.valueOf(getPort()))
                    .rpcType(RpcTypeEnum.WEB_SOCKET.getName())
                    .eventType(EventType.REGISTER)
                    .build();
        } catch (ShenyuException e) {
            throw new ShenyuException(e.getMessage() + "please config ${shenyu.client.http.props.port} in xml/yml !");
        }
    }
@Test
    public void testBuildURIRegisterDTO() {
        URIRegisterDTO uriRegisterDTO = eventListener.buildURIRegisterDTO(applicationContext, Collections.emptyMap());
        assertNotNull(uriRegisterDTO);
        assertEquals("/contextPath", uriRegisterDTO.getContextPath());
        assertEquals("appName", uriRegisterDTO.getAppName());
        assertEquals("127.0.0.1", uriRegisterDTO.getHost());
        assertEquals(8080, uriRegisterDTO.getPort());
    }