create unit test using spring boot for this code 
package com.senpare.paymentservice.service;

import com.senpare.paymentservice.dto.LicenseRequest;
import com.senpare.paymentservice.dto.PaymentLogRequest;
import com.senpare.paymentservice.dto.PaymentStatus;
import com.senpare.paymentservice.exception.BadRequestException;
import com.senpare.paymentservice.exception.ResourceNotFoundException;
import com.senpare.paymentservice.model.License;
import com.senpare.paymentservice.model.PaymentLog;
import com.senpare.paymentservice.repository.PaymentLogRepository;
import com.senpare.paymentservice.utilities.PaymentServiceMessages;
import com.senpare.paymentservice.utilities.Util;
import jakarta.transaction.Transactional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import java.util.UUID;

@Service
@RequiredArgsConstructor
@Slf4j
public class PaymentLogService {

    private final PaymentLogRepository paymentLogRepository;
    private final LicenseService licenseService;

    public PaymentLog create(PaymentLogRequest request) {
        if(request == null) {
            throw new BadRequestException(PaymentServiceMessages.canNotBeNull("PaymentLogRequest"));
        }

        PaymentLog paymentLog = createPaymentLogFromRequest(request);

        return paymentLogRepository.save(paymentLog);
    }

    public PaymentLog get(UUID uuid) {
        if(uuid == null) {
            throw new BadRequestException(PaymentServiceMessages.canNotBeNull("PaymentLog.uuid"));
        }

        return paymentLogRepository.findById(uuid)
                .orElseThrow(() -> new ResourceNotFoundException(PaymentServiceMessages.canNotBeFound("PaymentLog", "uuid", uuid.toString())));
    }

    public PaymentLog getByTransactionRef(String txRef) {
        if(Util.isNullOrEmpty(txRef)) {
            throw new BadRequestException(PaymentServiceMessages.canNotBeNull("PaymentLog.txRef"));
        }

        return paymentLogRepository.findByTransactionReference(txRef)
                .orElseThrow(() -> new ResourceNotFoundException(PaymentServiceMessages.canNotBeFound("PaymentLog","txRef", txRef)));
    }

    public Page<PaymentLog> getAll(int page, int size, String sortBy) {
        return Util.paginate(paymentLogRepository, page, size, sortBy);
    }

    @Transactional
    public PaymentLog verifyPayment(String txRef) {
        if(Util.isNullOrEmpty(txRef)) {
            throw new BadRequestException(PaymentServiceMessages.canNotBeNull("PaymentLog.txRef"));
        }

        PaymentLog paymentLog = paymentLogRepository.findByTransactionReference(txRef)
                .orElseThrow(() -> new ResourceNotFoundException(PaymentServiceMessages.canNotBeFound("PaymentLog","txRef", txRef)));

        paymentLog.setStatus(PaymentStatus.SUCCESSFUL);

        log.info("Creating a licence after payment verification for transaction reference: {}", txRef);
        LicenseRequest request = new LicenseRequest()
                .setEmail(paymentLog.getEmail())
                .setAmount(paymentLog.getAmount());
        License license = licenseService.create(request);
        paymentLog.setLicense(license);

        return paymentLogRepository.save(paymentLog);
    }

    public PaymentLog cancelPayment(String txRef) {
        if(Util.isNullOrEmpty(txRef)) {
            throw new BadRequestException(PaymentServiceMessages.canNotBeNull("PaymentLog.txRef"));
        }

        PaymentLog paymentLog = paymentLogRepository.findByTransactionReference(txRef)
                .orElseThrow(() -> new ResourceNotFoundException(PaymentServiceMessages.canNotBeFound("PaymentLog","txRef", txRef)));


        paymentLog.setStatus(PaymentStatus.FAILED);

        return paymentLogRepository.save(paymentLog);
    }

    public boolean isPaymentVerified(String txRef) {
        if(Util.isNullOrEmpty(txRef)) {
            throw new BadRequestException(PaymentServiceMessages.canNotBeNull("PaymentLog.txRef"));
        }

        PaymentLog paymentLog = paymentLogRepository.findByTransactionReference(txRef)
                .orElseThrow(() -> new ResourceNotFoundException(PaymentServiceMessages.canNotBeFound("PaymentLog","txRef", txRef)));

        return paymentLog.getStatus() == PaymentStatus.SUCCESSFUL;
    }


    private PaymentLog createPaymentLogFromRequest(PaymentLogRequest request) {
        return new PaymentLog()
                .setUuid(UUID.randomUUID())
                .setEmail(request.getEmail())
                .setPaymentProvider(request.getPaymentProvider())
                .setTransactionReference(request.getTransactionReference())
                .setAmount(request.getAmount())
                .setStatus(PaymentStatus.INITIALIZED)
                ;

    }
}
PaymentLogRequest code is 
package com.senpare.paymentservice.dto;

import lombok.Getter;

import java.math.BigDecimal;

@Getter
public class PaymentLogRequest {

    private String email;
    private String paymentProvider;
    private String transactionReference;
    private BigDecimal amount;

    public PaymentLogRequest setEmail(String email) {
        this.email = email;
        return this;
    }

    public PaymentLogRequest setPaymentProvider(String paymentProvider) {
        this.paymentProvider = paymentProvider;
        return this;
    }

    public PaymentLogRequest setTransactionReference(String transactionReference) {
        this.transactionReference = transactionReference;
        return this;
    }

    public PaymentLogRequest setAmount(BigDecimal amount) {
        this.amount = amount;
        return this;
    }
}
PaymentLog code is 
package com.senpare.paymentservice.model;
import com.senpare.paymentservice.dto.PaymentStatus;
import jakarta.persistence.*;
import lombok.Getter;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.UUID;

@Entity
@Table(name = "payment_log")
@Getter
public class PaymentLog extends AuditableBean {

    @Id
    @Column(name = "uuid", nullable = false)
    private UUID uuid;
    @Column(nullable = false)
    private String email;
    @Column(name = "payment_provider", nullable = false)
    private String paymentProvider;
    @Column(nullable = false)
    private BigDecimal amount;
    @Column(name = "transaction_reference", unique = true, nullable = false)
    private String transactionReference;
    @OneToOne(targetEntity = License.class, cascade = {CascadeType.DETACH, CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
    @JoinColumn(name = "license_id", referencedColumnName = "uuid")
    private License license;
    @Enumerated
    @Column(nullable = false)
    private PaymentStatus status;

    public PaymentLog setUuid(UUID uuid) {
        this.uuid = uuid;
        return this;
    }

    public PaymentLog setEmail(String email) {
        this.email = email;
        return this;
    }

    public PaymentLog setPaymentProvider(String paymentProvider) {
        this.paymentProvider = paymentProvider;
        return this;
    }

    public PaymentLog setAmount(BigDecimal amount) {
        this.amount = amount;
        return this;
    }

    public PaymentLog setTransactionReference(String transactionReference) {
        this.transactionReference = transactionReference;
        return this;
    }

    public PaymentLog setLicense(License license) {
        this.license = license;
        return this;
    }

    public PaymentLog setStatus(PaymentStatus status) {
        this.status = status;
        return this;
    }

    public PaymentLog setCreatedOn(LocalDateTime createdOn) {
        return (PaymentLog) super.setCreatedOn(createdOn);
    }

    public PaymentLog setCreatedBy(String createdBy) {
        return (PaymentLog) super.setCreatedBy(createdBy);
    }

    public PaymentLog setModifiedOn(LocalDateTime modifiedOn) {
        return (PaymentLog) super.setModifiedOn(modifiedOn);
    }

    public PaymentLog setModifiedBy(String modifiedBy) {
        return (PaymentLog) super.setModifiedBy(modifiedBy);
    }
}