@BeforeClass
    public static void createChains() throws Exception
    {
        // Generate re-usable certificate chains (these are resource intensive to generate).
        validChain = KeystoreTestUtils.generateValidCertificateChain().getCertificateChain();
        expiredIntChain  = KeystoreTestUtils.generateCertificateChainWithExpiredIntermediateCert().getCertificateChain();
        expiredRootChain = KeystoreTestUtils.generateCertificateChainWithExpiredRootCert().getCertificateChain();
    }
The system under test (refreshed before every test invocation).
xmppserver/src/test/java/org/jivesoftware/openfire/keystore/CheckChainTrustedTest.java