private static PrivateKey getPrivateKey() throws Exception {
        val factory = new PrivateKeyFactoryBean();
        factory.setAlgorithm(RsaKeyUtil.RSA);
        factory.setLocation(new ClassPathResource("keys/RSA2048Private.key"));
        factory.setSingleton(false);
        assertSame(PrivateKey.class, factory.getObjectType());
        return factory.getObject();
    }
This is {@link EncodingUtilsTests}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-util/src/test/java/org/apereo/cas/util/EncodingUtilsTests.java