@Test void handleRequestClaimed() { final RequestClaimedNotificationDto notificationDto = RequestClaimedNotificationDto.builder().build(); final RequestClaimedNotification notification = RequestClaimedNotificationMother.aRequestClaimedNotification(); when(requestClaimedNotificationMapper.map(same(notificationDto))).thenReturn(notification); handler.handle(notificationDto); verify(notificationRepository).save(same(notification)); }
@EventListener @Transactional(propagation = REQUIRES_NEW) public void handle(final RequestFundedNotificationDto notification) { notificationRepository.save(requestFundedNotificationMapper.map(notification)); }
PersistNotificationHandler { @EventListener @Transactional(propagation = REQUIRES_NEW) public void handle(final RequestFundedNotificationDto notification) { notificationRepository.save(requestFundedNotificationMapper.map(notification)); } }
PersistNotificationHandler { @EventListener @Transactional(propagation = REQUIRES_NEW) public void handle(final RequestFundedNotificationDto notification) { notificationRepository.save(requestFundedNotificationMapper.map(notification)); } PersistNotificationHandler(final NotificationRepository notificationRepository,
                                      final RequestFundedNotificationMapper requestFundedNotificationMapper,
                                      final RequestClaimedNotificationMapper requestClaimedNotificationMapper); }
PersistNotificationHandler { @EventListener @Transactional(propagation = REQUIRES_NEW) public void handle(final RequestFundedNotificationDto notification) { notificationRepository.save(requestFundedNotificationMapper.map(notification)); } PersistNotificationHandler(final NotificationRepository notificationRepository,
                                      final RequestFundedNotificationMapper requestFundedNotificationMapper,
                                      final RequestClaimedNotificationMapper requestClaimedNotificationMapper); @EventListener @Transactional(propagation = REQUIRES_NEW) void handle(final RequestFundedNotificationDto notification); @EventListener @Transactional(propagation = REQUIRES_NEW) void handle(final RequestClaimedNotificationDto notification); }
PersistNotificationHandler { @EventListener @Transactional(propagation = REQUIRES_NEW) public void handle(final RequestFundedNotificationDto notification) { notificationRepository.save(requestFundedNotificationMapper.map(notification)); } PersistNotificationHandler(final NotificationRepository notificationRepository,
                                      final RequestFundedNotificationMapper requestFundedNotificationMapper,
                                      final RequestClaimedNotificationMapper requestClaimedNotificationMapper); @EventListener @Transactional(propagation = REQUIRES_NEW) void handle(final RequestFundedNotificationDto notification); @EventListener @Transactional(propagation = REQUIRES_NEW) void handle(final RequestClaimedNotificationDto notification);  }