	@Test
	public void testStress() throws NoSessionException, GetFailedException, PutFailedException, IOException,
			NoPeerConnectionException, AbortModifyException {

		File root = tempFolder.newFolder();
		UserProfileManager profileManager = new UserProfileManager(client.getDataManager(), userCredentials);
		for (int i = 0; i < 10; i++) {
			final boolean isFolder = rnd.nextBoolean();

			final File file = new File(root, randomString());
			if (!isFolder) {
				FileUtils.writeStringToFile(file, randomString());
			}
			final byte[] hash = HashUtil.hash(file);
			final KeyPair fileKeys = generateRSAKeyPair(RSA_KEYLENGTH.BIT_512);

			while (true) {
				String pid = UUID.randomUUID().toString();
				profileManager.modifyUserProfile(pid, new IUserProfileModification() {

					@Override
					public void modifyUserProfile(UserProfile userProfile) {
						List<FolderIndex> indexes = getIndexList(userProfile.getRoot());
						if (isFolder) {
							new FolderIndex(indexes.get(rnd.nextInt(indexes.size())), fileKeys, randomString());
						} else {
							new FileIndex(indexes.get(rnd.nextInt(indexes.size())), fileKeys, file.getName(), hash);
						}
					}
				});
				break;
			}
		}
	}