Write a junit for the following class,
package com.sc.we.idv.plugin.common;

import com.sc.we.idv.plugin.service.IDVExternalPluginService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

import static com.sc.we.idv.common.constants.IDVConstants.EXTERNAL_PLUGIN_SERVICE_IMPL;

public class AbstractIDVService {

    private static Logger logger = LoggerFactory.getLogger(AbstractPluginClient.class);

    @Autowired
    private ApplicationContext context;
    
    protected IDVExternalPluginService plugInService(String country) {
        IDVExternalPluginService service = (IDVExternalPluginService) context
                .getBean(country + EXTERNAL_PLUGIN_SERVICE_IMPL);
        return service;
    }
}


Sample junit,
package com.sc.we.idv.faceCapture.service.impl;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.when;

import com.sc.we.idv.IDVBaseTest;
import com.sc.we.idv.TestCommonUtils;
import com.sc.we.idv.config.IDVConfig;
import com.sc.we.idv.config.TokenConfig;
import com.sc.we.idv.entity.IDVTransaction;
import com.sc.we.idv.faceCapture.entity.IDVFaceCaptureTransaction;
import com.sc.we.idv.faceCapture.model.convertor.IDVTransactionBOToIDVFaceCaptureTxn;
import com.sc.we.idv.faceCapture.model.convertor.IDVTransactionBOToInitializeResponse;
import com.sc.we.idv.faceCapture.repository.IDVFaceCaptureTransactionRepo;
import com.sc.we.idv.plugin.client.zoloz.model.coverter.IDVTransactionResponseToIdvTransactionEntity;
import com.sc.we.idv.plugin.service.IDVExternalPluginService;
import com.sc.we.idv.repository.InitializeRepository;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

import com.sc.we.idv.faceCapture.model.InitializeRequest;
import com.sc.we.idv.faceCapture.model.InitializeResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

import java.util.HashMap;

public class IDVFaceCaptureServiceImplTest extends IDVBaseTest {

    @InjectMocks
    private IDVFaceCaptureServiceImpl service;

    @Mock
    private IDVFaceCaptureTransactionRepo repository;

    @Mock
    private IDVConfig config;

    @Mock
    private ApplicationContext context;

    @Mock
    private IDVExternalPluginService mockPluginService;
    
    @Mock
    private IDVTransactionResponseToIdvTransactionEntity converter;

    @Mock
    private IDVTransactionBOToIDVFaceCaptureTxn iDVTransactionBOToIDVFaceCaptureTxnConverter;

    @Mock
    private TokenConfig tokenConfig;

    @Mock
    private IDVTransactionBOToInitializeResponse iDVTransactionBOToInitializeResponse;

    @BeforeEach
    public void setUp() {
        MockitoAnnotations.openMocks(this);
        // Set up the context mock to return the mockPluginService for any requested bean
        when(context.getBean(anyString())).thenReturn(mockPluginService);

        
    }

    @Test
    public void testInitialize() throws Exception {
        // Given
        InitializeRequest request = new InitializeRequest();
        request.setInternalInfo(TestCommonUtils.buildInternalInfo()); 
        request.setServiceInfo(TestCommonUtils.buildServiceInfoo());

        // When
        HashMap<String, String> expiryMap = new HashMap<>();
        expiryMap.put("HK", "15"); // Mock value for token expiry
        when(tokenConfig.getExpiry()).thenReturn(expiryMap);
        when(config.isFaceCaptureInitializeEnabled(any())).thenReturn(true);
        when(converter.idvTransactionConverter(any())).thenReturn(new IDVTransaction());
        when(iDVTransactionBOToInitializeResponse.convert(any())).thenReturn(TestCommonUtils.buildInitializeRequestFC());
        when(iDVTransactionBOToIDVFaceCaptureTxnConverter.convert(any())).thenReturn(new IDVFaceCaptureTransaction());
        InitializeResponse response = service.initialize(request);

        // Then
        assertNotNull(response);
        assertNotNull(response.getInternalInfo());
        assertEquals("New", response.getInternalInfo().getServiceType());

        assertNotNull(response.getServiceInfo());
        assertEquals("TXNREF1002", response.getServiceInfo().getTransactionReference());
        assertEquals("HK20240423001", response.getServiceInfo().getChannelReference());
        assertEquals("gdfgfj", response.getServiceInfo().getAckReference());
        assertEquals("02", response.getServiceInfo().getSegmentCode());
        assertEquals("D", response.getServiceInfo().getProductIdentifier());

    }
}
It's source class for sample test,
package com.sc.we.idv.faceCapture.service.impl;

import com.sc.we.idv.aspect.CountryContext;
import com.sc.we.idv.config.IDVConfig;
import com.sc.we.idv.config.TokenConfig;
import com.sc.we.idv.entity.IDVTransaction;
import com.sc.we.idv.faceCapture.entity.IDVFaceCaptureTransaction;
import com.sc.we.idv.faceCapture.model.*;
import com.sc.we.idv.faceCapture.model.convertor.IDVTransactionBOToIDVFaceCaptureTxn;
import com.sc.we.idv.faceCapture.model.convertor.IDVTransactionBOToInitializeResponse;
import com.sc.we.idv.faceCapture.repository.IDVFaceCaptureTransactionRepo;
import com.sc.we.idv.faceCapture.service.IDVFaceCaptureService;
import com.sc.we.idv.model.IDVTransactionBO;
import com.sc.we.idv.plugin.common.AbstractIDVService;
import com.sc.we.idv.plugin.service.IDVExternalPluginService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@Component
public class IDVFaceCaptureServiceImpl extends AbstractIDVService implements IDVFaceCaptureService {

    private static Logger logger = LoggerFactory.getLogger(IDVFaceCaptureServiceImpl.class);

    @Autowired
    private IDVConfig config;

    @Autowired
    private IDVFaceCaptureTransactionRepo repository;

    @Autowired
    private IDVTransactionBOToIDVFaceCaptureTxn converter;
    
    @Autowired
    private IDVTransactionBOToInitializeResponse iDVTransactionBOToInitializeResponse;
    
    @Override
    @CountryContext
    public InitializeResponse initialize(InitializeRequest request) throws Exception {
        IDVTransactionBO transactionBO = new IDVTransactionBO();
        String source_country = request.getInternalInfo().getSourceCountry();

        if (config.isFaceCaptureInitializeEnabled(source_country)) {
            IDVExternalPluginService service = plugInService(source_country);
            // transactionBO = service.initialize(req); TODO : Make a vendor/client call here -> return_type : IDVTransactionBO
            buildMockIDVTransactionBO(transactionBO, request); // TODO : TBD
            persistingIDVTransaction(transactionBO, source_country);
        }
        InitializeResponse response = buildInitializeResponse(transactionBO);
        logger.info("Exiting IDVServiceImpl initialize");
        return response;
    }

    private void buildMockIDVTransactionBO(IDVTransactionBO transactionBO, InitializeRequest request) {
        transactionBO.setIdvTransactionId(1L);
        buildInternalInfo(transactionBO, request.getInternalInfo());
        buildServiceInfo(transactionBO, request.getServiceInfo());
    }

    private void buildServiceInfo(IDVTransactionBO transactionBO, ServiceInfo serviceInfo) {
        transactionBO.setTransactionReference(serviceInfo.getTransactionReference());
        transactionBO.setChannelReference(serviceInfo.getChannelReference());
        transactionBO.setAckReferenceNo(serviceInfo.getAckReference());
        transactionBO.setVendorTransactionId(serviceInfo.getVendorTransactionId());
        transactionBO.setSegmentCode(serviceInfo.getSegmentCode());
        transactionBO.setProductIdentifier(serviceInfo.getProductIdentifier());
    }

    private void buildInternalInfo(IDVTransactionBO transactionBO, InternalInfo internalInfo) {
        transactionBO.setServiceType(internalInfo.getServiceType());
        transactionBO.setSourceCountry(internalInfo.getSourceCountry());
        transactionBO.setSystemIdentifier(internalInfo.getSystemIdentifier());
    }

    private void persistingIDVTransaction(IDVTransactionBO transactionBO, String sourceCountry) throws Exception {
        IDVFaceCaptureTransaction transaction = converter.convert(transactionBO);
        repository.save(transaction);
    }
    
    private InitializeResponse buildInitializeResponse(IDVTransactionBO transactionBO) {
        return iDVTransactionBOToInitializeResponse.convert(transactionBO);
    }
}