public static X509Certificate loadX509Cert(String fileName)
            throws CertificateException, IOException {
        CertificateFactory cf = CertificateFactory.getInstance("X.509");

        InputStream in = TlsCertUtils.class.getResourceAsStream("/certs/" + fileName);
        try {
            return (X509Certificate) cf.generateCertificate(in);
        } finally {
            in.close();
        }
    }
Loads an X.509 certificate from the classpath resources in src/main/resources/certs.

@param fileName name of a file in src/main/resources/certs.
collector/src/test/java/com/navercorp/pinpoint/collector/receiver/grpc/TlsCertUtils.java