@Test void requestRefund() { final long requestId = 547L; final String funderAddress = "hjfgkh"; final String requestedBy = "4567gjfh"; refundService.requestRefund(RequestRefundCommand.builder().requestId(requestId).funderAddress(funderAddress).requestedBy(requestedBy).build()); verify(refundRequestRepository).save(refEq(RefundRequest.builder() .requestId(requestId) .funderAddress(funderAddress) .requestedBy(requestedBy) .build())); }
@Override @Transactional public void requestRefund(final RequestRefundCommand requestRefundCommand) { refundRequestRepository.save(RefundRequest.builder() .requestId(requestRefundCommand.getRequestId()) .funderAddress(requestRefundCommand.getFunderAddress()) .requestedBy(requestRefundCommand.getRequestedBy()) .build()); }
RefundServiceImpl implements RefundService { @Override @Transactional public void requestRefund(final RequestRefundCommand requestRefundCommand) { refundRequestRepository.save(RefundRequest.builder() .requestId(requestRefundCommand.getRequestId()) .funderAddress(requestRefundCommand.getFunderAddress()) .requestedBy(requestRefundCommand.getRequestedBy()) .build()); } }
RefundServiceImpl implements RefundService { @Override @Transactional public void requestRefund(final RequestRefundCommand requestRefundCommand) { refundRequestRepository.save(RefundRequest.builder() .requestId(requestRefundCommand.getRequestId()) .funderAddress(requestRefundCommand.getFunderAddress()) .requestedBy(requestRefundCommand.getRequestedBy()) .build()); } RefundServiceImpl(final RefundRequestRepository refundRequestRepository,
                             final RefundRepository refundRepository,
                             final RefundRequestDtoMapper refundRequestDtoMapper,
                             final CacheManager cacheManager,
                             final ApplicationEventPublisher applicationEventPublisher); }
RefundServiceImpl implements RefundService { @Override @Transactional public void requestRefund(final RequestRefundCommand requestRefundCommand) { refundRequestRepository.save(RefundRequest.builder() .requestId(requestRefundCommand.getRequestId()) .funderAddress(requestRefundCommand.getFunderAddress()) .requestedBy(requestRefundCommand.getRequestedBy()) .build()); } RefundServiceImpl(final RefundRequestRepository refundRequestRepository,
                             final RefundRepository refundRepository,
                             final RefundRequestDtoMapper refundRequestDtoMapper,
                             final CacheManager cacheManager,
                             final ApplicationEventPublisher applicationEventPublisher); @Override @Transactional void requestRefund(final RequestRefundCommand requestRefundCommand); @Override @Transactional(readOnly = true) List<RefundRequestDto> findAllRefundRequestsFor(final long requestId, final RefundRequestStatus... statuses); @Override @Transactional(readOnly = true) List<RefundRequestDto> findAllRefundRequestsFor(final long requestId, final String funderAddress, final RefundRequestStatus status); @Override @Transactional void refundProcessed(final RefundProcessedCommand command); }
RefundServiceImpl implements RefundService { @Override @Transactional public void requestRefund(final RequestRefundCommand requestRefundCommand) { refundRequestRepository.save(RefundRequest.builder() .requestId(requestRefundCommand.getRequestId()) .funderAddress(requestRefundCommand.getFunderAddress()) .requestedBy(requestRefundCommand.getRequestedBy()) .build()); } RefundServiceImpl(final RefundRequestRepository refundRequestRepository,
                             final RefundRepository refundRepository,
                             final RefundRequestDtoMapper refundRequestDtoMapper,
                             final CacheManager cacheManager,
                             final ApplicationEventPublisher applicationEventPublisher); @Override @Transactional void requestRefund(final RequestRefundCommand requestRefundCommand); @Override @Transactional(readOnly = true) List<RefundRequestDto> findAllRefundRequestsFor(final long requestId, final RefundRequestStatus... statuses); @Override @Transactional(readOnly = true) List<RefundRequestDto> findAllRefundRequestsFor(final long requestId, final String funderAddress, final RefundRequestStatus status); @Override @Transactional void refundProcessed(final RefundProcessedCommand command);  }