// Check principal
X509TokenSecurityEvent event =
(X509TokenSecurityEvent)securityEventListener.getSecurityEvent(WSSecurityEventConstants.X509Token);
Assert.assertNotNull(event);
X509SecurityToken token = event.getSecurityToken();
Principal principal = token.getPrincipal();
Assert.assertTrue(principal instanceof X500Principal);
}
}