@Test
    public void getServer() {
        ServerConfig serverConfig = new ServerConfig().setProtocol("test").setPort(1234);
        Server server = ServerFactory.getServer(serverConfig);
        Assert.assertNotNull(server);

        boolean error = false;
        try {
            serverConfig = new ServerConfig().setProtocol("test1").setPort(2345);
            ServerFactory.getServer(serverConfig);
        } catch (Exception e) {
            error = true;
        }
        Assert.assertTrue(error);

        Assert.assertTrue(ServerFactory.getServers().size() > 0);

        ServerFactory.destroyAll();
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/api/src/test/java/com/alipay/sofa/rpc/server/ServerFactoryTest.java