Moved test logic to InMemoryRepositor and created ExpectedVersion