@Test
    public void destroyServer() {
        ServerConfig serverConfig = new ServerConfig().setProtocol("test").setPort(1234);
        Server server = serverConfig.buildIfAbsent();
        Assert.assertNotNull(server);
        Assert.assertEquals(1, ServerFactory.getServers().size());
        serverConfig.destroy();
        Assert.assertEquals(0, ServerFactory.getServers().size());
        Assert.assertNull(serverConfig.getServer());
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/api/src/test/java/com/alipay/sofa/rpc/server/ServerFactoryTest.java