@Test
    public void testLocal() {

        final ConsumerConfig<HelloService> consumerConfig = new ConsumerConfig<HelloService>()
            .setInterfaceId(HelloService.class.getName())
            .setProtocol(RpcConstants.PROTOCOL_TYPE_BOLT)
            .setBootstrap("bolt")
            .setApplication(new ApplicationConfig().setAppName("clientApp"))
            .setReconnectPeriod(1000)
            .setMockMode("local")
            .setMockRef(new HelloService() {
                @Override
                public String sayHello(String name, int age) {
                    return "mock";
                }
            });

        HelloService helloService = consumerConfig.refer();
        Assert.assertEquals("mock", helloService.sayHello("xx", 22));

    }
@author <a href="mailto:zhiyuan.lzy@antfin.com">zhiyuan.lzy</a>
test/test-integration/src/test/java/com/alipay/sofa/rpc/client/bolt/BoltMockTest.java