seedConfig.peers.runMaintainance = false;
seedConfig.peers.runBroadcast = false;
seedConfig.localHostName = "localhost";
seedConfig.udp.listenPort = 7643;
final File seedDir = TestUtils.createTempDirectory();
final TrNode seedNode = new TrNode(seedDir, seedConfig);
final RemoteNodeAddress seedPublicNodeId = seedNode.getRemoteNodeAddress();
final File joinerDir = TestUtils.createTempDirectory();
final TrNodeConfig joinerConfig = new TrNodeConfig();
joinerConfig.udp.listenPort = 7644;
joinerConfig.localHostName = "localhost";
joinerConfig.peers.runMaintainance = true;
joinerConfig.peers.topologyMaintenance = true;
joinerConfig.peers.runBroadcast = true;
joinerConfig.capabilities.allowsAssimilation = true;
joinerConfig.capabilities.allowsUnsolicitiedInbound = false;
joinerConfig.capabilities.receivesMessageBroadcasts = true;
final File joinerPubNodeIdsDir = new File(joinerDir, joinerConfig.publicNodeIdsDir);
joinerPubNodeIdsDir.mkdir();
final File joinerDir2 = TestUtils.createTempDirectory();
final TrNodeConfig joinerConfig2 = new TrNodeConfig();
joinerConfig2.udp.listenPort = 7645;
joinerConfig2.localHostName = "localhost";
joinerConfig2.peers.runMaintainance = true;
joinerConfig2.peers.topologyMaintenance = true;
joinerConfig2.peers.runBroadcast = true;
joinerConfig2.capabilities.allowsAssimilation = true;
joinerConfig2.capabilities.allowsUnsolicitiedInbound = false;
joinerConfig2.capabilities.receivesMessageBroadcasts = true;
final File joinerPubNodeIdsDir2 = new File(joinerDir2, joinerConfig2.publicNodeIdsDir);
joinerPubNodeIdsDir2.mkdir();
final TrPeerManager.TrPeerInfo seedPeerInfo = new TrPeerManager.TrPeerInfo(seedPublicNodeId);
seedPeerInfo.capabilities = seedConfig.capabilities;
Persistence.save(new File(joinerPubNodeIdsDir, "joiner-id"), seedPeerInfo);
Persistence.save(new File(joinerPubNodeIdsDir2, "joiner-id2"), seedPeerInfo);
final TrNode joinerNode = new TrNode(joinerDir, joinerConfig);
final TrNode joinerNode2 = new TrNode(joinerDir2, joinerConfig2);
try{
final TrMainWindow mainWindow = new TrMainWindow(joinerNode, "Default");
mainWindow.getContentPanel().revalidate();