@BeforeEach
    void initialize() throws Exception {
        val resource = new ClassPathResource("jaas-system.conf");
        val fileName = new File(FileUtils.getTempDirectory(), "jaas-authn.conf");
        try (val writer = Files.newBufferedWriter(fileName.toPath(), StandardCharsets.UTF_8)) {
            IOUtils.copy(resource.getInputStream(), writer, Charset.defaultCharset());
            writer.flush();
        }
        if (fileName.exists()) {
            System.setProperty("java.security.auth.login.config", '=' + fileName.getCanonicalPath());
        }
    }
This is {@link JaasAuthenticationHandlersConfigurationTests}.

@author Misagh Moayyed
@since 6.3.0
core/cas-server-core-authentication/src/test/java/org/apereo/cas/authentication/handler/support/JaasAuthenticationHandlersConfigurationTests.java