コード例 #1
0
 public RpcStub makeHandler2() throws IOException {
   BaseInvoker cli = new BaseInvoker(mock(IClient.class));
   cli.connect();
   cli.setConnectRetryTimes(5);
   return new RpcStub(cli, new JsonConverter());
 }
コード例 #2
0
 public RpcStub makeHandler(int retry) {
   BaseInvoker cli = mock(BaseInvoker.class);
   when(cli.getConnectRetryTimes()).thenReturn(retry);
   when(cli.isReady()).thenReturn(true);
   return new RpcStub(cli, new JsonConverter());
 }