@BeforeClass
    public static void setUp() {
        FileUtils.cleanDirectory(new File(filePath));

        registryConfig = new RegistryConfig()
            .setProtocol("local")
            //.setParameter("registry.local.scan.period", "1000")
            .setSubscribe(true)
            .setRegister(true);
        //        registryConfig.setAddress()
        //                .setConnectTimeout(5000)
        //                .setHeartbeatPeriod(60000)
        //                .setReconnectPeriod(15000)
        //                .setBatch(true)
        //                .setBatchSize(10);

        registry = (LocalRegistry) RegistryFactory.getRegistry(registryConfig);
        try {
            registry.init();
        } catch (Exception e) {
            Assert.assertTrue(e instanceof SofaRpcRuntimeException);
        }
        registryConfig.setFile(file);
        registry.init();
        registry.start();
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
registry/registry-local/src/test/java/com/alipay/sofa/rpc/registry/local/LocalRegistryTest.java