tvaultapi/src/main/java/com/tmobile/cso/vault/api/service/SSLCertificateService.java
private SSLCertificateMetadataDetails prepareMockdataForExternalCertificate(UserDetails userDetails,int containerId,
                                                                                SSLCertificateRequest sslCertificateRequest,
                                                                                SSLCertificateMetadataDetails sslCertificateMetadataDetails){
        CertificateData certDetails = nclmMockUtil.getMockCertificateData(sslCertificateRequest);
        sslCertificateMetadataDetails.setCertificateId(certDetails.getCertificateId());
        sslCertificateMetadataDetails.setCertificateName(certDetails.getCertificateName());
        sslCertificateMetadataDetails.setCreateDate(certDetails.getCreateDate());
        sslCertificateMetadataDetails.setExpiryDate(certDetails.getExpiryDate());
        sslCertificateMetadataDetails.setAuthority(certDetails.getAuthority());
        sslCertificateMetadataDetails.setCertificateStatus(certDetails.getCertificateStatus());
        sslCertificateMetadataDetails.setContainerName(certDetails.getContainerName());
        sslCertificateMetadataDetails.setDnsNames(certDetails.getDnsNames());
        sslCertificateMetadataDetails.setCertCreatedBy(userDetails.getUsername());
        sslCertificateMetadataDetails.setCertOwnerEmailId(sslCertificateRequest.getCertOwnerEmailId());
        sslCertificateMetadataDetails.setCertType(sslCertificateRequest.getCertType());
        sslCertificateMetadataDetails.setCertOwnerNtid(sslCertificateRequest.getCertOwnerNtid());
        sslCertificateMetadataDetails.setContainerId(containerId);
        sslCertificateMetadataDetails.setRequestStatus(SSLCertificateConstants.APPROVED);
        String[] notifEmailLst = sslCertificateRequest.getNotificationEmail().split(",");
		notifEmailLst = Arrays.stream(notifEmailLst).map(String::toLowerCase).distinct().toArray(String[]::new);
		sslCertificateMetadataDetails.setNotificationEmails(String.join(",", notifEmailLst));
        return sslCertificateMetadataDetails;
    }
/**
     * prepareMockdata for external certificate
     * @param userDetails
     * @param containerId
     * @param sslCertificateRequest
     * @return
     */
prepareMockdata for external certificate
@param userDetails
@param containerId
@param sslCertificateRequest
@return
prepareMockdata for external certificate @param userDetails @param containerId @param sslCertificateRequest @return
private SSLCertificateMetadataDetails prepareMockdataForExternalCertificate(UserDetails userDetails,int containerId,
                                                                                SSLCertificateRequest sslCertificateRequest,
                                                                                SSLCertificateMetadataDetails sslCertificateMetadataDetails){
        CertificateData certDetails = nclmMockUtil.getMockCertificateData(sslCertificateRequest);
        sslCertificateMetadataDetails.setCertificateId(certDetails.getCertificateId());
        sslCertificateMetadataDetails.setCertificateName(certDetails.getCertificateName());
        sslCertificateMetadataDetails.setCreateDate(certDetails.getCreateDate());
        sslCertificateMetadataDetails.setExpiryDate(certDetails.getExpiryDate());
        sslCertificateMetadataDetails.setAuthority(certDetails.getAuthority());
        sslCertificateMetadataDetails.setCertificateStatus(certDetails.getCertificateStatus());
        sslCertificateMetadataDetails.setContainerName(certDetails.getContainerName());
        sslCertificateMetadataDetails.setDnsNames(certDetails.getDnsNames());
        sslCertificateMetadataDetails.setCertCreatedBy(userDetails.getUsername());
        sslCertificateMetadataDetails.setCertOwnerEmailId(sslCertificateRequest.getCertOwnerEmailId());
        sslCertificateMetadataDetails.setCertType(sslCertificateRequest.getCertType());
        sslCertificateMetadataDetails.setCertOwnerNtid(sslCertificateRequest.getCertOwnerNtid());
        sslCertificateMetadataDetails.setContainerId(containerId);
        sslCertificateMetadataDetails.setRequestStatus(SSLCertificateConstants.APPROVED);
        String[] notifEmailLst = sslCertificateRequest.getNotificationEmail().split(",");
		notifEmailLst = Arrays.stream(notifEmailLst).map(String::toLowerCase).distinct().toArray(String[]::new);
		sslCertificateMetadataDetails.setNotificationEmails(String.join(",", notifEmailLst));
        return sslCertificateMetadataDetails;
    }
private SSLCertificateMetadataDetails prepareMockdataForExternalCertificate ( UserDetails userDetails , int containerId , SSLCertificateRequest sslCertificateRequest , SSLCertificateMetadataDetails sslCertificateMetadataDetails ) { CertificateData certDetails = nclmMockUtil . getMockCertificateData ( sslCertificateRequest ) ; sslCertificateMetadataDetails . setCertificateId ( certDetails . getCertificateId ( ) ) ; sslCertificateMetadataDetails . setCertificateName ( certDetails . getCertificateName ( ) ) ; sslCertificateMetadataDetails . setCreateDate ( certDetails . getCreateDate ( ) ) ; sslCertificateMetadataDetails . setExpiryDate ( certDetails . getExpiryDate ( ) ) ; sslCertificateMetadataDetails . setAuthority ( certDetails . getAuthority ( ) ) ; sslCertificateMetadataDetails . setCertificateStatus ( certDetails . getCertificateStatus ( ) ) ; sslCertificateMetadataDetails . setContainerName ( certDetails . getContainerName ( ) ) ; sslCertificateMetadataDetails . setDnsNames ( certDetails . getDnsNames ( ) ) ; sslCertificateMetadataDetails . setCertCreatedBy ( userDetails . getUsername ( ) ) ; sslCertificateMetadataDetails . setCertOwnerEmailId ( sslCertificateRequest . getCertOwnerEmailId ( ) ) ; sslCertificateMetadataDetails . setCertType ( sslCertificateRequest . getCertType ( ) ) ; sslCertificateMetadataDetails . setCertOwnerNtid ( sslCertificateRequest . getCertOwnerNtid ( ) ) ; sslCertificateMetadataDetails . setContainerId ( containerId ) ; sslCertificateMetadataDetails . setRequestStatus ( SSLCertificateConstants . APPROVED ) ; String [ ] notifEmailLst = sslCertificateRequest . getNotificationEmail ( ) . split ( "," ) ; notifEmailLst = Arrays . stream ( notifEmailLst ) . map ( String :: toLowerCase ) . distinct ( ) . toArray ( String [ ] :: new ) ; sslCertificateMetadataDetails . setNotificationEmails ( String . join ( "," , notifEmailLst ) ) ; return sslCertificateMetadataDetails ; }
prepareMockdata for external certificate
 @param userDetails
 @param containerId
 @param sslCertificateRequest
 @return
prepareMockdata for external certificate @param userDetails @param containerId @param sslCertificateRequest @return