48492330a706cbd0610cf4c7baf43fda95a64d32
Sara #3 / Felix #5 (PR #366 review). The previous version stubbed eventPublisher.publishEvent to throw, which proved the catch-and-translate syntax but skipped the listener entirely. The test could not have detected a regression where the listener swallowed the exception or re-wrapped it with a non-OptimisticLocking type. Replace with a real PersonMentionPropagationListener instance backed by a mocked TranscriptionBlockRepository whose saveAllAndFlush throws ObjectOptimisticLockingFailureException (the actual Spring exception Hibernate raises). The publisher mock routes the event to the real listener via doAnswer so the call chain is the production one: PersonService.updatePerson → publishEvent → listener.onPersonDisplayNameChanged → blockRepository.saveAllAndFlush throws → exception bubbles through the synchronous event dispatcher → PersonService catches → DomainException. Refs #362 #366 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Description
No description provided
Languages
Python
73.3%
TypeScript
11.4%
Java
10.8%
Svelte
4.2%
Shell
0.1%