@AfterClass
    public static void adAfterClass() {
        RpcRuntimeContext.destroy();
        RpcInternalContext.removeContext();
        RpcInvokeContext.removeContext();

        if (server != null) {
            try {
                server.stop();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
if you use zk to be registry ,your test case must be extends this class
@author <a href=mailto:leizhiyuan@gmail.com>leizhiyuan</a>
registry/registry-zk/src/test/java/com/alipay/sofa/rpc/registry/zk/base/BaseZkTest.java