}
@Test
public void testStepRollback() throws InterruptedException, NoPeerConnectionException,
InvalidProcessStateException {
NetworkManager putter = network.get(0); // where the process runs
putter.getConnection().getPeer().getPeerBean().storage(new DenyingPutTestStorage());
NetworkManager proxy = network.get(1); // where the user profile is stored
proxy.getConnection().getPeer().getPeerBean().storage(new DenyingPutTestStorage());
// create the needed objects
UserCredentials credentials = NetworkTestUtil.generateRandomCredentials();
UserProfile testProfile = new UserProfile(credentials.getUserId());
IConsumeUserProfile context = new ConsumeProfileContext(testProfile);
// initialize the process and the one and only step to test
PutUserProfileStep step = new PutUserProfileStep(credentials, context, putter.getDataManager());
TestProcessComponentListener listener = new TestProcessComponentListener();
step.attachListener(listener);
step.start();
UseCaseTestUtil.waitTillFailed(listener, 20);
// get the locations which should be stored at the proxy --> they should be null
FutureGet futureGet = proxy.getDataManager().getUnblocked(
new Parameters().setLocationKey(credentials.getProfileLocationKey()).setContentKey(
H2HConstants.USER_LOCATIONS));
futureGet.awaitUninterruptibly();
assertNull(futureGet.getData());
}