@Test public void test_Should_Donation_Create() { final List<Donation> donationList = new ArrayList<>(); donationList.add(getDonation()); final DonationRequest donationReq = new DonationRequest(); donationReq.setDonations(donationList); final DonationResponse donationResponse = new DonationResponse(); donationResponse.setResponseInfo(null); donationResponse.setDonations(donationList); when(donationService.create(any(DonationRequest.class))).thenReturn(donationReq); assertTrue(donationReq.equals(donationService.create(donationReq))); }
public DonationRequest create(final DonationRequest donationRequest) { return donationRepository.create(donationRequest); }
DonationService { public DonationRequest create(final DonationRequest donationRequest) { return donationRepository.create(donationRequest); } }
DonationService { public DonationRequest create(final DonationRequest donationRequest) { return donationRepository.create(donationRequest); }  }
DonationService { public DonationRequest create(final DonationRequest donationRequest) { return donationRepository.create(donationRequest); }  DonationRequest create(final DonationRequest donationRequest); DonationRequest update(final DonationRequest donationRequest); List<Donation> pushCreateToQueue(final String topic, final String key, final DonationRequest donationRequest); List<Donation> pushUpdateToQueue(final String topic, final String key, final DonationRequest donationRequest); List<Donation> getDonationList(final DonationGetRequest donationGetRequest); boolean checkDonationsExist(final Donation donation); boolean checkPipeSizeExists(final Double pipeSize, final String tenantId); boolean checkUsageAndSubUsageExists(final String usageType, final String tenantId); }
DonationService { public DonationRequest create(final DonationRequest donationRequest) { return donationRepository.create(donationRequest); }  DonationRequest create(final DonationRequest donationRequest); DonationRequest update(final DonationRequest donationRequest); List<Donation> pushCreateToQueue(final String topic, final String key, final DonationRequest donationRequest); List<Donation> pushUpdateToQueue(final String topic, final String key, final DonationRequest donationRequest); List<Donation> getDonationList(final DonationGetRequest donationGetRequest); boolean checkDonationsExist(final Donation donation); boolean checkPipeSizeExists(final Double pipeSize, final String tenantId); boolean checkUsageAndSubUsageExists(final String usageType, final String tenantId);  }