serviceHelper.registerNodeService(nodeService);
}
public void testGetNodeServiceProxy() throws Exception {
Peer peer = (Peer) mock(Peer.class);
ServiceProxyFactory proxyFactory =
serviceSpace.getServiceProxyFactory(NodeService.SERVICE_NAME, new Class[] {NodeService.class});
proxyFactory.getInvocationMetaData();
InvocationMetaData invMetaData = (InvocationMetaData) intercept(InvocationMetaData.class, "InvocationMetaData");
modify().returnValue(invMetaData);
invMetaData.setTargets(new Peer[] {peer});
proxyFactory.getProxy();
modify().returnValue(nodeService);
startVerification();
assertSame(nodeService, serviceHelper.getNodeServiceProxy(peer));