node.stop();
}
private void testNode(Node node) {
node.start();
HelloWorld hw = node.getService(HelloWorld.class, "HelloWorld");
Assert.assertEquals("Hello, Node", hw.hello("Node"));
hw = node.getService(HelloWorld.class, null);
Assert.assertEquals("Hello, Node", hw.hello("Node"));
String address = node.getEndpointAddress("HelloWorld");
Assert.assertNotNull(address);
address = node.getEndpointAddress("HelloWorld/HelloWorld");
Assert.assertNotNull(address);
address = node.getEndpointAddress("HelloWorld/HelloWorld/HelloWorld");
Assert.assertNotNull(address);
address = node.getEndpointAddress("HelloWorld/HelloWorld1");
Assert.assertNull(address);
HelloWorld.Message msg = new HelloWorld.Message();
msg.name = "John";
msg.message = "Hi";
Assert.assertSame(msg, hw.echo(msg));
node.stop();
}