}
@Test(timeout = 60000)
public void testOptimisticLocking() throws Throwable {
// unfortunately, we cannot use @Before on the setUp, because of the TemporaryFolder
initializeRepository(new OptimisticLockManager());
long lastSequenceNumber = executeConcurrentModifications(CONCURRENT_MODIFIERS);
assertTrue("Expected at least one successful modification. Got " + getSuccessfulModifications(),
getSuccessfulModifications() >= 1);
int expectedEventCount = getSuccessfulModifications() * 2;
assertTrue("It seems that no events have been published at all", lastSequenceNumber >= 0);