@Test public void testMockedInvokerSelect() { initlistsize5(); invokers.add(mockedInvoker1); RpcInvocation mockedInvocation = new RpcInvocation(); mockedInvocation.setMethodName("sayHello"); mockedInvocation.setAttachment(Constants.INVOCATION_NEED_MOCK, "true"); List<Invoker<IHelloService>> mockedInvokers = dic.list(mockedInvocation); Assert.assertEquals(1, mockedInvokers.size()); List<Invoker<IHelloService>> invokers = dic.list(invocation); Assert.assertEquals(5, invokers.size()); }
protected List<Invoker<T>> list(Invocation invocation) throws RpcException { List<Invoker<T>> invokers = directory.list(invocation); return invokers; }
AbstractClusterInvoker implements Invoker<T> { protected List<Invoker<T>> list(Invocation invocation) throws RpcException { List<Invoker<T>> invokers = directory.list(invocation); return invokers; } }
AbstractClusterInvoker implements Invoker<T> { protected List<Invoker<T>> list(Invocation invocation) throws RpcException { List<Invoker<T>> invokers = directory.list(invocation); return invokers; } AbstractClusterInvoker(Directory<T> directory);  AbstractClusterInvoker(Directory<T> directory, URL url); }
AbstractClusterInvoker implements Invoker<T> { protected List<Invoker<T>> list(Invocation invocation) throws RpcException { List<Invoker<T>> invokers = directory.list(invocation); return invokers; } AbstractClusterInvoker(Directory<T> directory);  AbstractClusterInvoker(Directory<T> directory, URL url); @Override Class<T> getInterface(); @Override URL getUrl(); @Override boolean isAvailable(); @Override void destroy(); @Override Result invoke(final Invocation invocation); @Override String toString(); }
AbstractClusterInvoker implements Invoker<T> { protected List<Invoker<T>> list(Invocation invocation) throws RpcException { List<Invoker<T>> invokers = directory.list(invocation); return invokers; } AbstractClusterInvoker(Directory<T> directory);  AbstractClusterInvoker(Directory<T> directory, URL url); @Override Class<T> getInterface(); @Override URL getUrl(); @Override boolean isAvailable(); @Override void destroy(); @Override Result invoke(final Invocation invocation); @Override String toString();  }