protected void connect0(CertConfig certConfig) {
        String caCertPath = certConfig.getCaCertPath();
        String remoteAddress = certConfig.getRemoteAddress();
        logger.info(
                "Try to connect to Dubbo Cert Authority server: " + remoteAddress + ", caCertPath: " + remoteAddress);
        try {
            if (StringUtils.isNotEmpty(caCertPath)) {
                channel = NettyChannelBuilder.forTarget(remoteAddress)
                        .sslContext(GrpcSslContexts.forClient()
                                .trustManager(new File(caCertPath))
                                .build())
                        .build();
            } else {
                logger.warn(
                        CONFIG_SSL_CONNECT_INSECURE,
                        "",
                        "",
                        "No caCertPath is provided, will use insecure connection.");
                channel = NettyChannelBuilder.forTarget(remoteAddress)
                        .sslContext(GrpcSslContexts.forClient()
                                .trustManager(InsecureTrustManagerFactory.INSTANCE)
                                .build())
                        .build();
            }
        } catch (Exception e) {
            logger.error(LoggerCodeConstants.CONFIG_SSL_PATH_LOAD_FAILED, "", "", "Failed to load SSL cert file.", e);
            throw new RuntimeException(e);
        }
    }
@Test
    void testConnect3() {
        FrameworkModel frameworkModel = new FrameworkModel();
        DubboCertManager certManager = new DubboCertManager(frameworkModel);
        String file = this.getClass()
                .getClassLoader()
                .getResource("certs/broken-ca.crt")
                .getFile();
        CertConfig certConfig = new CertConfig("127.0.0.1:30062", null, file, null);
        Assertions.assertThrows(RuntimeException.class, () -> certManager.connect0(certConfig));

        frameworkModel.destroy();
    }