Code example for UnresolvedPermission

0
     * @see com.intel.drl.test.SerializationTest#getData() 
     */ 
    protected Object[] getData() {
        // test with real certificates ? 
        return new Object[] {
                new UnresolvedPermission("type", "name", "actions", null),
                new UnresolvedPermission("type", null, null, new Certificate[0]) };
    } 
     
    public void testSerializationWithCertificates() throws Exception { 
 
        // Regression for HARMONY-2762 
        CertificateFactory certificateFactory = CertificateFactory
                .getInstance("X.509");
        Certificate certificate = certificateFactory
                .generateCertificate(new ByteArrayInputStream(TestUtils
                        .getEncodedX509Certificate())); 
 
        UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
                "java.security.SecurityPermission", "a.b.c", "action", 
                new Certificate[] { certificate });