private List<Thread> startedThreads = new ArrayList<Thread>();
private static final int CONCURRENT_MODIFIERS = 10;
@Test(timeout = 60000)
public void testPessimisticLocking() throws Throwable {
initializeRepository(new PessimisticLockManager());
long lastSequenceNumber = executeConcurrentModifications(CONCURRENT_MODIFIERS);
// with pessimistic locking, all modifications are guaranteed successful
// note: sequence number 20 means there are 21 events. This includes the one from the setup
assertEquals(2 * CONCURRENT_MODIFIERS, lastSequenceNumber);