@Test public void successQueryUserTest() throws Exception { QueryUserCondition queryUserCondition = new QueryUserCondition(); OutService outService = new AlwaysSuccessOutServiceImpl(); User user = new UserServiceImpl(outService).queryUser(queryUserCondition); LOGGER.info("queryUserTest：" + user); }
@Override public User queryUser(QueryUserCondition condition) { outService.remoteCall(); return new User(); }
UserServiceImpl implements UserService { @Override public User queryUser(QueryUserCondition condition) { outService.remoteCall(); return new User(); } }
UserServiceImpl implements UserService { @Override public User queryUser(QueryUserCondition condition) { outService.remoteCall(); return new User(); } UserServiceImpl();  UserServiceImpl(OutService outService); }
UserServiceImpl implements UserService { @Override public User queryUser(QueryUserCondition condition) { outService.remoteCall(); return new User(); } UserServiceImpl();  UserServiceImpl(OutService outService); @Override User queryUser(QueryUserCondition condition); }
UserServiceImpl implements UserService { @Override public User queryUser(QueryUserCondition condition) { outService.remoteCall(); return new User(); } UserServiceImpl();  UserServiceImpl(OutService outService); @Override User queryUser(QueryUserCondition condition);  }