public class TestRMI {
@Test
public void test() {
RMISink sink;
RMISource source;
Graph g1 = new DefaultGraph("g1");
Graph g2 = new DefaultGraph("g2");
try {
LocateRegistry.createRegistry(1099);
} catch (Exception e) {
}
try {
String name = "__test_rmi_source";
sink = new RMISink();
g1.addSink(sink);
source = new RMISource();
source.addSink(g2);
source.bind(name);
sink.register("//localhost/" + name);
} catch (RemoteException e) {
fail();
}
Node A = g1.addNode("A");