for (NetworkManager node : network) {
KeyPair keyPair = EncryptionUtil.generateRSAKeyPair(H2HConstants.KEYLENGTH_USER_KEYS);
UserCredentials userCredentials = generateRandomCredentials();
UserProfileManager profileManager = new UserProfileManager(node.getDataManager(), userCredentials);
PublicKeyManager keyManager = new PublicKeyManager(userCredentials.getUserId(), keyPair, node.getDataManager());
IFileConfiguration config = FileConfiguration.createDefault();
DownloadManager downloadManager = new DownloadManager(node.getDataManager(), node.getMessageManager(),
keyManager, config);
File root = new File(System.getProperty("java.io.tmpdir"), NetworkTestUtil.randomString());
H2HSession session;
session = new H2HSession(profileManager, keyManager, downloadManager, config, root.toPath());