private Sabotage sabotage( RelationshipStore store, long id )
{
RelationshipRecord before = store.getRecord( id, store.newRecord(), RecordLoad.NORMAL );
RelationshipRecord after = before.clone();
long otherReference;
if ( !after.isFirstInFirstChain() )
{
after.setFirstPrevRel( otherReference = after.getFirstPrevRel() + 1 );
}
else
{
after.setFirstNextRel( otherReference = after.getFirstNextRel() + 1 );
}
store.prepareForCommit( after );
store.updateRecord( after );
RelationshipRecord other = store.getRecord( otherReference, store.newRecord(), RecordLoad.FORCE );
return new Sabotage( before, after, other );
}
}