### Question:
KycInfoService { @Transactional public KycInfo setKycCompleteByUuid(UUID uuid, boolean isKycComplete) throws InvestorNotFoundException { Optional<KycInfo> kycInfoFromDb = kycInfoRepository.findOptionalByKycUuid(uuid); if(kycInfoFromDb.isPresent()) { KycInfo kycInfo = kycInfoFromDb.get().setKycComplete(isKycComplete); kycInfoFromDb = Optional.of(kycInfoRepository.save(kycInfo)); } return kycInfoFromDb.orElseThrow(InvestorNotFoundException::new); } @Autowired  KycInfoService(KycInfoRepository kycInfoRepository); @Transactional KycInfo saveKycInfo(long investorId, URI kycUri); @Transactional KycInfo setKycComplete(long investorId, boolean isKycComplete); @Transactional KycInfo setKycCompleteByUuid(UUID uuid, boolean isKycComplete); @Transactional KycInfo setKycUri(long investorId, String kycUri); @Transactional KycInfo setKycStartEmailSent(long investorId); @Transactional KycInfo increaseNumberOfRemindersSent(long investorId); KycInfo getKycInfoByInvestorId(long investorId); KycInfo getKycInfoByKycUuid(UUID kycUuid); List<Long> getAllInvestorIdWhereStartKycEmailSent();  }### Answer:
@Test public void testSetKycCompleteByUuid() throws KycInfoNotSavedException { kycInfoService.saveKycInfo(50, kycUri); Optional<KycInfo> oKycInfo = kycInfoRepository.findOptionalByInvestorId(50); assertKycInfo(oKycInfo.get(), 50, false, 0, false, kycUri); try { kycInfoService.setKycCompleteByUuid(oKycInfo.get().getKycUuid(), true); } catch(InvestorNotFoundException e) { fail(e.getMessage()); } oKycInfo = kycInfoRepository.findOptionalByInvestorId(50); assertKycInfo(oKycInfo.get(), 50, false, 0, true, kycUri); }