@Test
    public void testFullChain() throws Exception
    {
        // Setup fixture.
        final X509CertSelector selector = new X509CertSelector();
        selector.setSubject( validChain[0].getSubjectX500Principal() );
        final X509Certificate[] chain = validChain;

        // Execute system under test.
        final CertPath result = trustManager.checkChainTrusted( selector, chain );

        // Verify results
        Assert.assertNotNull( result );
    }
Verifies that providing a complete and valid chain does not throw an exception (selection criteria during this
test: match on subject). This is a 'happy flow' test.
xmppserver/src/test/java/org/jivesoftware/openfire/keystore/CheckChainTrustedTest.java