@Before
    public void before() {

        httpMockServer = new HttpMockServer();
        meshApiClient = new MeshApiClient("http://127.0.0.1:7654");

        httpMockServer.initSever(7654);
        ApplicationInfoResult applicationInfoResult = new ApplicationInfoResult();
        applicationInfoResult.setSuccess(true);
        httpMockServer.addMockPath(MeshEndpoint.CONFIGS, JSON.toJSONString(applicationInfoResult));

        PublishServiceResult publishServiceResult = new PublishServiceResult();
        publishServiceResult.setSuccess(true);
        httpMockServer.addMockPath(MeshEndpoint.PUBLISH, JSON.toJSONString(publishServiceResult));

        SubscribeServiceResult subscribeServiceResult = new SubscribeServiceResult();
        subscribeServiceResult.setSuccess(true);
        httpMockServer.addMockPath(MeshEndpoint.SUBCRIBE, JSON.toJSONString(subscribeServiceResult));

        UnPublishServiceResult unPublishServiceResult = new UnPublishServiceResult();
        unPublishServiceResult.setSuccess(true);
        httpMockServer.addMockPath(MeshEndpoint.UN_PUBLISH, JSON.toJSONString(unPublishServiceResult));

        UnSubscribeServiceResult unSubscribeServiceResult = new UnSubscribeServiceResult();
        unSubscribeServiceResult.setSuccess(true);
        httpMockServer.addMockPath(MeshEndpoint.UN_SUBCRIBE, JSON.toJSONString(unSubscribeServiceResult));
        httpMockServer.start();
    }
@author <a href=mailto:leizhiyuan@gmail.com>leizhiyuan</a>
registry/registry-mesh/src/test/java/com/alipay/sofa/rpc/registry/mesh/MeshApiClientTest.java