@Test
    public void testAcceptedIssuersAreAllValid() throws Exception
    {
        // Setup fixture.

        // Execute system under test.
        final X509Certificate[] result = systemUnderTest.getAcceptedIssuers();

        // Verify results.
        assertEquals( 2, result.length );
        assertTrue( Arrays.asList( result ).contains( getLast( validChain ) ) );
        assertTrue( Arrays.asList( result ).contains( getLast( expiredIntChain ) ) );
        assertFalse( Arrays.asList( result ).contains( getLast( expiredRootChain ) ) );
    }
This test verifies that {@link OpenfireX509TrustManager#getAcceptedIssuers()} does not return expired
certificates.
xmppserver/src/test/java/org/jivesoftware/openfire/keystore/OpenfireX509TrustManagerTest.java