### Question:
RefundServiceImpl implements RefundService { @Override @Transactional(readOnly = true) public List<RefundRequestDto> findAllRefundRequestsFor(final long requestId, final RefundRequestStatus... statuses) { return refundRequestDtoMapper.mapToList(refundRequestRepository.findAllByRequestIdAndStatusIn(requestId, statuses)); } 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);  }### Answer:
@Test public void findAllRefundRequestsForRequestIdAndStatus() { final long requestId = 3389L; final RefundRequestStatus status = PENDING; final List<RefundRequest> refundRequests = new ArrayList<>(); final ArrayList<RefundRequestDto> refundRequestDtos = new ArrayList<>(); when(refundRequestRepository.findAllByRequestIdAndStatusIn(requestId, status)).thenReturn(refundRequests); when(refundRequestDtoMapper.mapToList(same(refundRequests))).thenReturn(refundRequestDtos); final List<RefundRequestDto> result = refundService.findAllRefundRequestsFor(requestId, status); assertThat(result).isSameAs(refundRequestDtos); }
@Test public void findAllRefundRequestsForRequestIdAndFunderAddressAndStatus() { final long requestId = 347L; final String funderAddress = "0x6457hfd"; final RefundRequestStatus status = PROCESSED; final List<RefundRequest> refundRequests = new ArrayList<>(); final ArrayList<RefundRequestDto> refundRequestDtos = new ArrayList<>(); when(refundRequestRepository.findAllByRequestIdAndFunderAddressAndStatus(requestId, funderAddress, status)).thenReturn(refundRequests); when(refundRequestDtoMapper.mapToList(same(refundRequests))).thenReturn(refundRequestDtos); final List<RefundRequestDto> result = refundService.findAllRefundRequestsFor(requestId, funderAddress, status); assertThat(result).isSameAs(refundRequestDtos); }