harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r410788 [8/13] - in /incubator/harmony/enhanced/classlib/trunk/modules: auth/make/common/ auth/src/test/java/common/javax/security/auth/ auth/src/test/java/common/javax/security/auth/callback/serialization/ auth/src/test/java/common/javax/s...
Date Thu, 01 Jun 2006 08:15:44 GMT
Added: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java.injected/java/security/cert/X509CertificateTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java.injected/java/security/cert/X509CertificateTest.java?rev=410788&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java.injected/java/security/cert/X509CertificateTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java.injected/java/security/cert/X509CertificateTest.java Thu Jun  1 01:15:17 2006
@@ -0,0 +1,284 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Alexander Y. Kleymenov
+* @version $Revision$
+*/
+
+package java.security.cert;
+
+import java.io.ByteArrayInputStream;
+import java.math.BigInteger;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Principal;
+import java.security.PublicKey;
+import java.security.SignatureException;
+import java.util.Date;
+import java.util.Set;
+
+import javax.security.auth.x500.X500Principal;
+
+import org.apache.harmony.luni.util.Base64;
+import org.apache.harmony.security.tests.support.cert.TestUtils;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * X509CertificateTest
+ */
+public class X509CertificateTest extends TestCase {
+
+    // Base64 encoded form of ASN.1 DER encoded X.509 Certificate
+    // (see RFC 3280 at http://www.ietf.org/rfc/rfc3280.txt)
+    // (generated by using of classes from 
+    // org.apache.harmony.security.x509 package)
+    static String base64cert =
+          "MIIByzCCATagAwIBAgICAiswCwYJKoZIhvcNAQEFMB0xGzAZBgNVBAoT"
+        + "EkNlcnRpZmljYXRlIElzc3VlcjAeFw0wNjA0MjYwNjI4MjJaFw0zMzAz"
+        + "MDExNjQ0MDlaMB0xGzAZBgNVBAoTEkNlcnRpZmljYXRlIElzc3VlcjCB"
+        + "nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAkLGLsPdSPDMyP1OUOKu+"
+        + "U3cvbNK5RGaQ3bXc5aDjvApx43BcaoXgt6YD/5yXz0OsIooj5yA37+bY"
+        + "JGcVrvFD5FMPdDd3vjNPQOep0MzG4CdbkaZde5SigPabOMQYS4oUyLBx"
+        + "W3LGG0mUODe5AGGqtqXU0GlKg4K2je6cCtookCUCAwEAAaMeMBwwGgYD"
+        + "VR0RAQH/BBAwDoEMcmZjQDgyMi5OYW1lMAsGCSqGSIb3DQEBBQOBgQBZ"
+        + "pVXj01dOpqnZErU+Qb50j8lJD1dIaz1eJTvJCSadj7ziV1VtnnapI07c"
+        + "XEa7ONzcHQTYTG10poHfOK/a0BaULF3GlctDESilwQYbW5BdfpAlZpbH"
+        + "AFLcUDh6Eq50kc+0A/anh/j3mgBNuvbIMo7hHNnZB6k/prswm2BszyLD"
+        + "yw==";
+
+    // Base64 encoded form of ASN.1 DER encoded X.509 CRL
+    // (see RFC 3280 at http://www.ietf.org/rfc/rfc3280.txt)
+    // (generated by using of classes from 
+    // org.apache.harmony.security.x509 package)
+    static String base64crl = 
+          "MIHXMIGXAgEBMAkGByqGSM44BAMwFTETMBEGA1UEChMKQ1JMIElzc3Vl"
+        + "chcNMDYwNDI3MDYxMzQ1WhcNMDYwNDI3MDYxNTI1WjBBMD8CAgIrFw0w"
+        + "NjA0MjcwNjEzNDZaMCowCgYDVR0VBAMKAQEwHAYDVR0YBBUYEzIwMDYw"
+        + "NDI3MDYxMzQ1LjQ2OFqgDzANMAsGA1UdFAQEBAQEBDAJBgcqhkjOOAQD"
+        + "AzAAMC0CFQCk0t0DTyu82QpajbBlxX9uXvUDSgIUSBN4g+xTEeexs/0k"
+        + "9AkjBhjF0Es=";
+
+    // has stub implementation for abstract methods
+    private static class MyX509Certificate extends X509Certificate {
+
+            public void checkValidity()
+                    throws CertificateExpiredException,
+                           CertificateNotYetValidException {}
+
+            public void checkValidity(Date date)
+                    throws CertificateExpiredException,
+                           CertificateNotYetValidException {}
+
+            public int getVersion() {
+                return 3;
+            }
+
+            public BigInteger getSerialNumber() {
+                return null;
+            }
+
+            public Principal getIssuerDN() {
+                return null;
+            }
+
+            public Principal getSubjectDN() {
+                return null;
+            }
+
+            public Date getNotBefore() {
+                return null;
+            }
+
+            public Date getNotAfter() {
+                return null;
+            }
+
+            public byte[] getTBSCertificate()
+                                throws CertificateEncodingException
+            {
+                return null;
+            }
+
+            public byte[] getSignature() {
+                return null;
+            }
+
+            public String getSigAlgName() {
+                return null;
+            }
+
+            public String getSigAlgOID() {
+                return null;
+            }
+
+            public byte[] getSigAlgParams() {
+                return null;
+            }
+
+            public boolean[] getIssuerUniqueID() {
+                return null;
+            }
+
+            public boolean[] getSubjectUniqueID() {
+                return null;
+            }
+
+            public boolean[] getKeyUsage() {
+                return null;
+            }
+
+            public int getBasicConstraints() {
+                return 0;
+            }
+
+            public void verify(PublicKey key)
+                         throws CertificateException, NoSuchAlgorithmException,
+                                InvalidKeyException, NoSuchProviderException,
+                                SignatureException
+            {
+            }
+
+            public void verify(PublicKey key,
+                                        String sigProvider)
+                         throws CertificateException, NoSuchAlgorithmException,
+                                InvalidKeyException, NoSuchProviderException,
+                                SignatureException
+            {
+            }
+
+            public String toString() {
+                return "";
+            }
+
+            public PublicKey getPublicKey() {
+                return null;
+            }
+
+            public byte[] getEncoded() throws CertificateEncodingException
+            {
+                return null;
+            }
+
+            public Set getNonCriticalExtensionOIDs() {
+                return null;
+            }
+
+            public Set getCriticalExtensionOIDs() {
+                return null;
+            }
+
+            public byte[] getExtensionValue(String oid) {
+                return null;
+            }
+
+            public boolean hasUnsupportedCriticalExtension() {
+                return false;
+            }
+    }
+
+    /**
+     * @tests java.security.cert.X509Certificate#getType()
+     */
+    public void testGetType() {
+        assertEquals("X.509", new MyX509Certificate().getType());
+    }
+
+    /**
+     * @tests java.security.cert.X509Certificate#getIssuerX500Principal()
+     */
+    public void testGetIssuerX500Principal() {
+        // return valid encoding
+        MyX509Certificate cert = new MyX509Certificate() {
+            public byte[] getEncoded() {
+                return TestUtils.getX509Certificate_v1();
+            };
+        };
+
+        assertEquals(new X500Principal("CN=Z"), cert.getIssuerX500Principal());
+    }
+
+    /**
+     * @tests java.security.cert.X509Certificate#getSubjectX500Principal()
+     */
+    public void testGetSubjectX500Principal() {
+        // return valid encoding
+        MyX509Certificate cert = new MyX509Certificate() {
+            public byte[] getEncoded() {
+                return TestUtils.getX509Certificate_v1();
+            };
+        };
+
+        assertEquals(new X500Principal("CN=Y"), cert.getSubjectX500Principal());
+    }
+
+    /**
+     * @tests java.security.cert.X509Certificate#getExtendedKeyUsage()
+     */
+    public void testGetExtendedKeyUsage() throws CertificateParsingException {
+        assertNull(new MyX509Certificate().getExtendedKeyUsage());
+    }
+
+    /**
+     * @tests java.security.cert.X509Certificate#getSubjectAlternativeNames()
+     */
+    public void testGetSubjectAlternativeNames()
+            throws CertificateParsingException {
+
+        assertNull(new MyX509Certificate().getSubjectAlternativeNames());
+    }
+
+    /**
+     * @tests java.security.cert.X509Certificate#getIssuerAlternativeNames()
+     */
+    public void testGetIssuerAlternativeNames()
+            throws CertificateParsingException {
+
+        assertNull(new MyX509Certificate().getIssuerAlternativeNames());
+    }
+
+    /**
+     * @tests java.security.cert.X509Certificate#getExtensionValue()
+     */
+    public void testGetExtensionValue() throws Exception {
+        // Regression for HARMONY-419
+        ByteArrayInputStream is = null;
+        CertificateFactory certFactory = CertificateFactory
+                .getInstance("X.509");
+        is = new ByteArrayInputStream(Base64.decode(base64cert.getBytes()));
+        X509Certificate cert = (X509Certificate) certFactory
+                .generateCertificate(is);
+        cert.getExtensionValue("1.1.1.1");
+
+        is = new ByteArrayInputStream(Base64.decode(base64crl.getBytes()));
+        X509CRL crl = (X509CRL) certFactory.generateCRL(is);
+        crl.getExtensionValue("1.1.1.1");
+    }
+    
+    
+    public static Test suite() {
+        return new TestSuite(X509CertificateTest.class);
+    }
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(suite());
+    }
+}
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java.injected/org/apache/harmony/security/DefaultPolicyScannerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java.injected/org/apache/harmony/security/DefaultPolicyScannerTest.java?rev=410788&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java.injected/org/apache/harmony/security/DefaultPolicyScannerTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java.injected/org/apache/harmony/security/DefaultPolicyScannerTest.java Thu Jun  1 01:15:17 2006
@@ -0,0 +1,585 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Alexey V. Varlamov
+* @version $Revision$
+*/
+
+package org.apache.harmony.security;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StreamTokenizer;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.harmony.security.DefaultPolicyScanner;
+import junit.framework.TestCase;
+
+
+/**
+ * TODO Put your class description here
+ * 
+ */
+
+public class DefaultPolicyScannerTest extends TestCase {
+    
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(DefaultPolicyScannerTest.class);
+    }
+
+    private static String IO_ERROR = "Failed intentionally";
+
+    private DefaultPolicyScanner scanner;
+
+    private static StreamTokenizer getST(String sample) {
+        return new StreamTokenizer(new StringReader(sample));
+    }
+
+    private static StreamTokenizer getFailingST(String sample) {
+        return new StreamTokenizer(new StringReader(sample)) {
+
+            public int nextToken() throws IOException {
+                throw new IOException(IO_ERROR);
+            }
+        };
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        scanner = new DefaultPolicyScanner();
+    }
+
+    /**
+     * Tests tokenization of valid policy sample with all possible elements.
+     */
+    public void testScanStream_Complex() throws Exception {
+        List grants = new ArrayList();
+        List keys = new ArrayList();
+        Reader r = new StringReader(
+            "keystore \"url1\";grant{}KeyStore \"url2\", \"type2\""
+                + "keystore \"url3\"\nGRANT signedby \"duke,Li\", "
+                + "codebase\"\", principal a.b.c \"alias\"{permission XXX \"YYY\", SignedBy \"ZZZ\" \n \t };;;");
+        scanner.scanStream(r, grants, keys);
+
+        assertEquals("3 keystores expected", 3, keys.size());
+        String[] urls = new String[] {
+            "url1", "url2", "url3" };
+        String[] types = new String[] {
+            null, "type2", null };
+        for (int i = 0; i < 3; i++) {
+            DefaultPolicyScanner.KeystoreEntry key = (DefaultPolicyScanner.KeystoreEntry)keys
+                .get(i);
+            assertEquals(urls[i], key.url);
+            assertEquals(types[i], key.type);
+        }
+        assertEquals("2 grants expected", 2, grants.size());
+        DefaultPolicyScanner.GrantEntry ge = (DefaultPolicyScanner.GrantEntry)grants
+            .get(0);
+        assertTrue(ge.codebase == null && ge.signers == null
+            && ge.principals == null && ge.permissions.size() == 0);
+
+        ge = (DefaultPolicyScanner.GrantEntry)grants.get(1);
+        assertTrue(ge.codebase.equals("") && ge.signers.equals("duke,Li")
+            && ge.principals.size() == 1 && ge.permissions.size() == 1);
+
+        DefaultPolicyScanner.PrincipalEntry pn = (DefaultPolicyScanner.PrincipalEntry)ge.principals
+            .iterator().next();
+        assertTrue(pn.klass.equals("a.b.c") && pn.name.equals("alias"));
+
+        DefaultPolicyScanner.PermissionEntry pe = (DefaultPolicyScanner.PermissionEntry)ge.permissions
+            .iterator().next();
+        assertTrue(pe.klass.equals("XXX") && pe.name.equals("YYY")
+            && pe.actions == null && pe.signers.equals("ZZZ"));
+    }
+
+    public void testScanStream_Empty() throws Exception {
+        scanner.scanStream(new StringReader(""), new ArrayList(),
+                           new ArrayList());
+    }
+
+    /**
+     * Tests that scanStream() throws InvalidFormatException on invalid
+     * keywords.
+     */
+    public void testScanStream_Invalid() throws Exception {
+        List grants = new ArrayList();
+        List keys = new ArrayList();
+        try {
+            scanner.scanStream(new StringReader(
+                "keystore \"url1\"; granted{} grant{}"), grants, keys);
+            fail("InvalidFormatException is not thrown");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+            assertTrue(keys.size() == 1 && grants.size() == 0);
+
+        }
+
+        try {
+            scanner.scanStream(new StringReader(
+                "grant{} grant{} keyshop \"url1\"; keystore \"url1\";"),
+                               grants, keys);
+            fail("InvalidFormatException is not thrown 2");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+            assertTrue(keys.size() == 1 && grants.size() == 2);
+
+        }
+    }
+
+    /**
+     * Tests that scanStream() throws IOException if stream fails.
+     */
+    public void testScanStream_IOException() throws Exception {
+        try {
+            scanner.scanStream(new Reader() {
+
+                public void close() throws IOException {
+                }
+
+                public int read(char[] cbuf, int off, int count)
+                    throws IOException {
+                    throw new IOException(IO_ERROR);
+                }
+            }, new ArrayList(), new ArrayList());
+            fail("IOException is intercepted");
+        } catch (IOException ok) {
+            assertEquals(IO_ERROR, ok.getMessage());
+        }
+    }
+
+    /**
+     * Tests that both handleUnexpectedToken() methods throw proper
+     * InvalidFormatException exception.
+     */
+    public void testHandleUnexpectedToken() {
+        try {
+            scanner.handleUnexpectedToken(getST(""));
+            fail("InvalidFormatException is not thrown");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+
+        String message = "bla-bli-blu";
+        try {
+            scanner.handleUnexpectedToken(getST(""), message);
+            fail("InvalidFormatException is not thrown 2");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+            assertNotNull(ok.getMessage());
+            assertTrue(ok.getMessage().indexOf(message) >= 0);
+        }
+    }
+
+    /**
+     * Tests readKeystoreEntry() for tokenizing all valid syntax variants.
+     */
+    public void testReadKeystoreEntry() throws Exception {
+        DefaultPolicyScanner.KeystoreEntry ke = scanner
+            .readKeystoreEntry(getST("\"URL1\""));
+        assertEquals("URL1", ke.url);
+        assertNull(ke.type);
+
+        ke = scanner.readKeystoreEntry(getST("\"URL2\",\"TYPE2\""));
+        assertEquals("URL2", ke.url);
+        assertEquals("TYPE2", ke.type);
+
+        ke = scanner.readKeystoreEntry(getST("\"URL3\" \"TYPE3\""));
+        assertEquals("URL3", ke.url);
+        assertEquals("TYPE3", ke.type);
+    }
+
+    /**
+     * Tests that readKeystoreEntry() throws IOException if stream fails.
+     */
+    public void testReadKeystoreEntry_IOException() throws Exception {
+        try {
+            scanner.readKeystoreEntry(getFailingST(""));
+            fail("IOException is intercepted");
+        } catch (IOException ok) {
+            assertEquals(IO_ERROR, ok.getMessage());
+        }
+    }
+
+    /**
+     * Tests that readKeystoreEntry() throws InvalidFormatException on invalid
+     * input
+     */
+    public void testReadKeystoreEntry_Invalid() throws Exception {
+        try {
+            scanner.readKeystoreEntry(getST(""));
+            fail("InvalidFormatException is not thrown 1");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readKeystoreEntry(getST(" ;"));
+            fail("InvalidFormatException is not thrown 2");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readKeystoreEntry(getST("URL"));
+            fail("InvalidFormatException is not thrown 3");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+    }
+
+    /**
+     * Tests readPrincipalEntry() for tokenizing all valid syntax variants.
+     */
+    public void testReadPrincipalEntry() throws Exception {
+        DefaultPolicyScanner.PrincipalEntry pe = scanner
+            .readPrincipalEntry(getST("\"name1\""));
+        assertEquals("name1", pe.name);
+        assertNull(pe.klass);
+
+        pe = scanner.readPrincipalEntry(getST("a.b.c.d\"name 2\""));
+        assertEquals("name 2", pe.name);
+        assertEquals("a.b.c.d", pe.klass);
+
+        pe = scanner.readPrincipalEntry(getST("* *"));
+        assertEquals(DefaultPolicyScanner.PrincipalEntry.WILDCARD, pe.name);
+        assertEquals(DefaultPolicyScanner.PrincipalEntry.WILDCARD, pe.klass);
+
+        pe = scanner.readPrincipalEntry(getST("* \"name3\""));
+        assertEquals("name3", pe.name);
+        assertEquals(DefaultPolicyScanner.PrincipalEntry.WILDCARD, pe.klass);
+
+        pe = scanner.readPrincipalEntry(getST("clazz *"));
+        assertEquals(DefaultPolicyScanner.PrincipalEntry.WILDCARD, pe.name);
+        assertEquals("clazz", pe.klass);
+    }
+
+    /**
+     * Tests that readPrincipalEntry() throws InvalidFormatException on invalid
+     * input
+     */
+    public void testReadPrincipalEntry_Invalid() throws Exception {
+        try {
+            scanner.readPrincipalEntry(getST(""));
+            fail("InvalidFormatException is not thrown 1");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readPrincipalEntry(getST(" ;"));
+            fail("InvalidFormatException is not thrown 2");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readPrincipalEntry(getST("class"));
+            fail("InvalidFormatException is not thrown 3");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readPrincipalEntry(getST("class name"));
+            fail("InvalidFormatException is not thrown 4");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readPrincipalEntry(getST("class, \"name\""));
+            fail("InvalidFormatException is not thrown 5");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readPrincipalEntry(getST("* name"));
+            fail("InvalidFormatException is not thrown 6");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+    }
+
+    /**
+     * Tests that readPrincipalEntry() throws IOException if stream fails.
+     */
+    public void testReadPrincipalEntry_IOException() throws Exception {
+        try {
+            scanner.readPrincipalEntry(getFailingST(""));
+            fail("IOException is intercepted");
+        } catch (IOException ok) {
+            assertEquals(IO_ERROR, ok.getMessage());
+        }
+    }
+
+    /**
+     * Tests readPermissionEntries() for tokenizing empty list of permissions.
+     */
+    public void testReadPermissionEntries_Empty() throws Exception {
+        Collection perms = scanner.readPermissionEntries(getST("}"));
+        assertNotNull(perms);
+        assertEquals(0, perms.size());
+    }
+
+    /**
+     * Tests readPermissionEntries() for tokenizing all valid syntax variants,
+     * for just one permission.
+     */
+    public void testReadPermissionEntries_Single() throws Exception {
+        Collection perms = scanner
+            .readPermissionEntries(getST("permission a.b.c; }"));
+        assertEquals(1, perms.size());
+        DefaultPolicyScanner.PermissionEntry pe = (DefaultPolicyScanner.PermissionEntry)perms
+            .iterator().next();
+        assertEquals("a.b.c", pe.klass);
+        assertNull(pe.name);
+        assertNull(pe.actions);
+        assertNull(pe.signers);
+
+        perms = scanner
+            .readPermissionEntries(getST("permission a.b.c \"name1\" }"));
+        assertEquals(1, perms.size());
+        pe = (DefaultPolicyScanner.PermissionEntry)perms.iterator().next();
+        assertEquals("a.b.c", pe.klass);
+        assertEquals("name1", pe.name);
+        assertNull(pe.actions);
+        assertNull(pe.signers);
+
+        perms = scanner
+            .readPermissionEntries(getST("permission a.b.c \"name2\", \"action2\"}"));
+        assertEquals(1, perms.size());
+        pe = (DefaultPolicyScanner.PermissionEntry)perms.iterator().next();
+        assertEquals("a.b.c", pe.klass);
+        assertEquals("name2", pe.name);
+        assertEquals("action2", pe.actions);
+        assertNull(pe.signers);
+
+        perms = scanner
+            .readPermissionEntries(getST("permission a.b.c \"name3\" signedby \"\"}"));
+        assertEquals(1, perms.size());
+        pe = (DefaultPolicyScanner.PermissionEntry)perms.iterator().next();
+        assertEquals("a.b.c", pe.klass);
+        assertEquals("name3", pe.name);
+        assertNull(pe.actions);
+        assertEquals("", pe.signers);
+
+        perms = scanner
+            .readPermissionEntries(getST("permission a.b.c4 ,\"actions4\" SignedBy \"sig4\"}"));
+        assertEquals(1, perms.size());
+        pe = (DefaultPolicyScanner.PermissionEntry)perms.iterator().next();
+        assertEquals("a.b.c4", pe.klass);
+        assertNull(pe.name);
+        assertEquals("actions4", pe.actions);
+        assertEquals("sig4", pe.signers);
+
+        perms = scanner
+            .readPermissionEntries(getST("permission a.b.c5 \"name5\",\"actions5\",signedby \"sig5\";}"));
+        assertEquals(1, perms.size());
+        pe = (DefaultPolicyScanner.PermissionEntry)perms.iterator().next();
+        assertEquals("a.b.c5", pe.klass);
+        assertEquals("name5", pe.name);
+        assertEquals("actions5", pe.actions);
+        assertEquals("sig5", pe.signers);
+    }
+
+    /**
+     * Tests readPermissionEntries() for tokenizing valid syntax for a list of
+     * permissions.
+     */
+    public void testReadPermissionEntries_List() throws Exception {
+        Collection perms = scanner
+            .readPermissionEntries(getST("permission a.b.c"
+                + " permission qwerty ,\"aaa\";"
+                + "permission zzz signedby \"xxx\"}"));
+        assertEquals(3, perms.size());
+
+        for (Iterator it = perms.iterator(); it.hasNext();) {
+            DefaultPolicyScanner.PermissionEntry pe = (DefaultPolicyScanner.PermissionEntry)it
+                .next();
+            if ("a.b.c".equals(pe.klass)) {
+                assertNull(pe.name);
+                assertNull(pe.actions);
+                assertNull(pe.signers);
+            } else if ("qwerty".equals(pe.klass)) {
+                assertNull(pe.name);
+                assertEquals("aaa", pe.actions);
+                assertNull(pe.signers);
+            } else if ("zzz".equals(pe.klass)) {
+                assertNull(pe.name);
+                assertNull(pe.actions);
+                assertEquals("xxx", pe.signers);
+            } else {
+                fail("Unknown permission reported: " + pe.klass);
+            }
+        }
+    }
+
+    /**
+     * Tests that readPermissionEntries() throws InvalidFormatException on
+     * invalid input
+     */
+    public void testReadPermissionEntries_Invalid() throws Exception {
+        try {
+            scanner.readPermissionEntries(getST("permission a.b.c"));
+            fail("InvalidFormatException is not thrown 1");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readPermissionEntries(getST("permission;}"));
+            fail("InvalidFormatException is not thrown 2");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readPermissionEntries(getST("permission class name}"));
+            fail("InvalidFormatException is not thrown 3");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readPermissionEntries(getST("permission class ,,}"));
+            fail("InvalidFormatException is not thrown 4");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner
+                .readPermissionEntries(getST("permission class \"name\", signedby signers}"));
+            fail("InvalidFormatException is not thrown 5");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+    }
+
+    /**
+     * Tests that readPermissionEntries() throws IOException if stream fails.
+     */
+    public void testReadPermissionEntries_IOException() throws Exception {
+        try {
+            scanner.readPermissionEntries(getFailingST(""));
+            fail("IOException is intercepted");
+        } catch (IOException ok) {
+            assertEquals(IO_ERROR, ok.getMessage());
+        }
+    }
+
+    /**
+     * Tests readGrantEntry() for tokenizing all valid syntax variants.
+     */
+    public void testReadGrantEntry_Empty() throws Exception {
+        DefaultPolicyScanner.GrantEntry ge = scanner.readGrantEntry(getST(""));
+        assertNull(ge.codebase);
+        assertNull(ge.codebase);
+        assertNull(ge.principals);
+        assertTrue(ge.permissions == null || ge.permissions.isEmpty());
+
+        ge = scanner.readGrantEntry(getST("{}"));
+        assertNull(ge.codebase);
+        assertNull(ge.codebase);
+        assertNull(ge.principals);
+        assertTrue(ge.permissions == null || ge.permissions.isEmpty());
+    }
+
+    /**
+     * Tests readGrantEntry() for tokenizing all valid syntax variants.
+     */
+    public void testReadGrantEntry() throws Exception {
+        DefaultPolicyScanner.GrantEntry ge = scanner
+            .readGrantEntry(getST("codebase \"u1\" signedby \"s1\";"));
+        assertEquals("u1", ge.codebase);
+        assertEquals("s1", ge.signers);
+        assertNull(ge.principals);
+
+        ge = scanner.readGrantEntry(getST("signedby \"s2\" codebase \"u2\";"));
+        assertEquals("u2", ge.codebase);
+        assertEquals("s2", ge.signers);
+        assertNull(ge.principals);
+
+        ge = scanner.readGrantEntry(getST("signedby \"s2\",signedby \"s3\" "
+            + " codebase \"u2\",codebase \"u3\";"));
+        assertEquals("u3", ge.codebase);
+        assertEquals("s3", ge.signers);
+        assertNull(ge.principals);
+
+        ge = scanner.readGrantEntry(getST("principal \"a1\" signedby \"s4\" "
+            + "principal \"a2\", codebase \"u4\";"));
+        assertEquals("u4", ge.codebase);
+        assertEquals("s4", ge.signers);
+        assertNotNull(ge.principals);
+        assertEquals(2, ge.principals.size());
+
+        ge = scanner.readGrantEntry(getST("principal * *, principal bbb \"b2\""
+            + ", principal ccc \"c2\" codebase \"u5\";"));
+        assertEquals("u5", ge.codebase);
+        assertNull(ge.signers);
+        assertNotNull(ge.principals);
+        assertEquals(3, ge.principals.size());
+
+        ge = scanner.readGrantEntry(getST("principal * *"
+            + ", signedby \"s6\";"));
+        assertNull(ge.codebase);
+        assertEquals("s6", ge.signers);
+        assertNotNull(ge.principals);
+        assertEquals(1, ge.principals.size());
+    }
+
+    /**
+     * Tests that readGrantEntry() throws InvalidFormatException on invalid
+     * input
+     */
+    public void testReadGrantEntry_Invalid() throws Exception {
+        try {
+            scanner.readGrantEntry(getST("codebase"));
+            fail("InvalidFormatException is not thrown 1");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readGrantEntry(getST("signedby"));
+            fail("InvalidFormatException is not thrown 2");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readGrantEntry(getST("signedby *"));
+            fail("InvalidFormatException is not thrown 3");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readGrantEntry(getST("codebase file://URL"));
+            fail("InvalidFormatException is not thrown 4");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+        try {
+            scanner.readGrantEntry(getST("codebase \"a2\", signedby \"a2\", "
+                + "principal a \"a2\", b \"b2\" "));
+            fail("InvalidFormatException is not thrown 5");
+        } catch (DefaultPolicyScanner.InvalidFormatException ok) {
+
+        }
+    }
+
+    /**
+     * Tests that readGrantEntry() throws IOException if stream fails.
+     */
+    public void testReadGrantEntry_IOException() throws Exception {
+        try {
+            scanner.readGrantEntry(getFailingST(""));
+            fail("IOException is intercepted");
+        } catch (IOException ok) {
+            assertEquals(IO_ERROR, ok.getMessage());
+        }
+    }
+}

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/PolicyEntryTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/PolicyEntryTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/PolicyEntryTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/PolicyEntryTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/PolicyEntryTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/PolicyEntryTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/PolicyEntryTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security;
+package org.apache.harmony.security.tests;
 
 import java.net.URL;
 import java.security.cert.Certificate;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/SystemScopeTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/SystemScopeTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/SystemScopeTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/SystemScopeTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/SystemScopeTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/SystemScopeTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/SystemScopeTest.java Thu Jun  1 01:15:17 2006
@@ -19,12 +19,16 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security;
+package org.apache.harmony.security.tests;
 
 import java.security.Identity;
 import java.security.IdentityScope;
 import java.security.KeyManagementException;
 import java.util.Enumeration;
+
+import org.apache.harmony.security.SystemScope;
+import org.apache.harmony.security.tests.support.IdentityScopeStub;
+import org.apache.harmony.security.tests.support.PublicKeyStub;
 
 import junit.framework.TestCase;
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/UnresolvedPrincipalTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/UnresolvedPrincipalTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/UnresolvedPrincipalTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/UnresolvedPrincipalTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/UnresolvedPrincipalTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/UnresolvedPrincipalTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/UnresolvedPrincipalTest.java Thu Jun  1 01:15:17 2006
@@ -18,7 +18,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security;
+package org.apache.harmony.security.tests;
 
 import java.security.Principal;
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/AnyTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/AnyTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/AnyTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/AnyTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/AnyTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/AnyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/AnyTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.IOException;
 import java.util.Arrays;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BerInputStreamTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/BerInputStreamTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BerInputStreamTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BerInputStreamTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/BerInputStreamTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/BerInputStreamTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BerInputStreamTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
  * @version $Revision$
  */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BitStringTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/BitStringTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BitStringTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BitStringTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/BitStringTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/BitStringTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BitStringTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
  * @version $Revision$
  */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.IOException;
 import java.util.Arrays;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BooleanTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/BooleanTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BooleanTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BooleanTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/BooleanTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/BooleanTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/BooleanTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.IOException;
 import java.util.Arrays;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ChoiceTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/ChoiceTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ChoiceTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ChoiceTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/ChoiceTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/ChoiceTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ChoiceTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.IOException;
 import java.util.ArrayList;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerGeneralizedTimeEDTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerGeneralizedTimeEDTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerGeneralizedTimeEDTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerUTCTimeEDTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerUTCTimeEDTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerUTCTimeEDTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ExplicitTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/ExplicitTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ExplicitTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ExplicitTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/ExplicitTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/ExplicitTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ExplicitTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.IOException;
 import java.util.ArrayList;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/GeneralizedTimeTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/GeneralizedTimeTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/GeneralizedTimeTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/GeneralizedTimeTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/GeneralizedTimeTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/GeneralizedTimeTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/GeneralizedTimeTest.java Thu Jun  1 01:15:17 2006
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.ByteArrayInputStream;
 import java.text.ParseException;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ImplicitTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/ImplicitTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ImplicitTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ImplicitTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/ImplicitTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/ImplicitTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/ImplicitTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -218,8 +218,7 @@
                 .decode(primitiveEncoding)));
 
         // encode primitive
-        assertTrue(Arrays.equals(primitiveEncoding, (byte[]) type2
-                .encode(array)));
+        assertTrue(Arrays.equals(primitiveEncoding, type2.encode(array)));
 
         // decode constructed
         try {

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/IntegerTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/IntegerTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/IntegerTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/IntegerTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/IntegerTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/IntegerTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/IntegerTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/OidTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/OidTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/OidTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/OidTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/OidTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/OidTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/OidTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.IOException;
 import java.util.Arrays;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/SequenceOfTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/SequenceOfTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/SequenceOfTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/SequenceOfTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/SequenceOfTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/SequenceOfTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/SequenceOfTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.IOException;
 import java.util.ArrayList;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/SequenceTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/SequenceTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/SequenceTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/SequenceTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/SequenceTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/SequenceTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/SequenceTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.IOException;
 import java.util.ArrayList;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/UTCTimeTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/UTCTimeTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/UTCTimeTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/UTCTimeTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/UTCTimeTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/UTCTimeTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/UTCTimeTest.java Thu Jun  1 01:15:17 2006
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package org.apache.harmony.security.asn1.der;
+package org.apache.harmony.security.tests.asn1.der;
 
 import java.io.ByteArrayInputStream;
 import java.text.ParseException;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/DefaultPolicyParserTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/DefaultPolicyParserTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/DefaultPolicyParserTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/DefaultPolicyParserTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/DefaultPolicyParserTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/DefaultPolicyParserTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/DefaultPolicyParserTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.fortress;
+package org.apache.harmony.security.tests.fortress;
 
 import java.io.File;
 import java.io.FileWriter;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/DefaultPolicyTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/DefaultPolicyTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/DefaultPolicyTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/DefaultPolicyTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/DefaultPolicyTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/DefaultPolicyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/DefaultPolicyTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.fortress;
+package org.apache.harmony.security.tests.fortress;
 
 import java.net.URL;
 import java.security.cert.Certificate;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/EngineTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/EngineTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/EngineTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/EngineTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/EngineTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/EngineTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/EngineTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.fortress;
+package org.apache.harmony.security.tests.fortress;
 
 import java.security.NoSuchAlgorithmException;
 import java.security.Provider;
@@ -44,17 +44,14 @@
 	/*
 	 * Class under test for SpiImpl getInstance(String, Object)
 	 */
-	public void testGetInstanceStringObject1() {
+	public void testGetInstanceStringObject1() throws Exception {
 		Provider p = new MyProvider();
 		Services.initServiceInfo(p);
 		Engine engine = new Engine("Service");
 		
 		
-		try {
-			engine.getInstance("AlGOrItHM", null);
-		} catch (NoSuchAlgorithmException e) {
-			fail("Unexpected NoSuchAlgorithmException" + e);
-		}
+		engine.getInstance("AlGOrItHM", null);
+
 		if (engine.provider != p) {
 			fail("Incorrect provider");
 		}
@@ -62,85 +59,71 @@
 			fail("Incorrect spi");
 		}
 	}
-	/*
+
+    /*
 	 * Class under test for SpiImpl getInstance(String, Object)
 	 */
-
 	public void testGetInstanceStringObject2() {
-		Provider p = new MyProvider();
-		Services.initServiceInfo(p);
-		Engine engine = new Engine("Service");
-		try {
-			engine.getInstance(null, null);
-			fail("No expected NoSuchAlgorithmException");
-			} catch (NoSuchAlgorithmException e) {
-		}
-	}
-	/*
-	 * Class under test for SpiImpl getInstance(String, Provider, Object)
-	 */
-	public void testGetInstanceStringProviderObject1() {
-		Provider p = new MyProvider();
-		Services.initServiceInfo(p);
-		Engine engine = new Engine("Service");
-
-		
-		try {
-			engine.getInstance("AlGOrItHM", p, null);
-		} catch (NoSuchAlgorithmException e) {
-			fail("Unexpected NoSuchAlgorithmException" + e);
-		}
-		if (engine.provider != p) {
-			fail("Incorrect provider");
-		}
-		if (!(engine.spi instanceof SomeClass)) {
-			fail("Incorrect spi");
-		}
-	}
-	
-	/*
-	 * Class under test for SpiImpl getInstance(String, Provider, Object)
-	 */
-
-	public void testGetInstanceStringProviderObject2() {
-		Provider p = new MyProvider();
-		Services.initServiceInfo(p);
-		Engine engine = new Engine("Service");
-		
-		try {
-			engine.getInstance(null, p, null);
-			fail("No expected NoSuchAlgorithmException");
-		} catch (NoSuchAlgorithmException e) {
-		}
-	}
+        Provider p = new MyProvider();
+        Services.initServiceInfo(p);
+        Engine engine = new Engine("Service");
+        try {
+            engine.getInstance(null, null);
+            fail("No expected NoSuchAlgorithmException");
+        } catch (NoSuchAlgorithmException e) {}
+    }
+
+    /*
+     * Class under test for SpiImpl getInstance(String, Provider, Object)
+     */
+    public void testGetInstanceStringProviderObject1() throws Exception {
+        Provider p = new MyProvider();
+        Services.initServiceInfo(p);
+        Engine engine = new Engine("Service");
+
+        engine.getInstance("AlGOrItHM", p, null);
+
+        if (engine.provider != p) {
+            fail("Incorrect provider");
+        }
+        if (!(engine.spi instanceof SomeClass)) {
+            fail("Incorrect spi");
+        }
+    }
+
+    /*
+     * Class under test for SpiImpl getInstance(String, Provider, Object)
+     */
+    public void testGetInstanceStringProviderObject2() {
+        Provider p = new MyProvider();
+        Services.initServiceInfo(p);
+        Engine engine = new Engine("Service");
+
+        try {
+            engine.getInstance(null, p, null);
+            fail("No expected NoSuchAlgorithmException");
+        } catch (NoSuchAlgorithmException e) {}
+    }
+
+    public void testGetInstanceStringProvider1() throws Exception {
+        Provider p = Security.getProvider("SUN");
+        if (p == null) {
+            return;
+        }
+        Engine engine = new Engine("CertStore");
+        engine.getInstance("Collection", p,
+                new java.security.cert.CollectionCertStoreParameters());
+    }
 	
-
-	public void testGetInstanceStringProvider1() {
+	public void testGetInstanceStringProvider2() throws Exception {
 		Provider p = Security.getProvider("SUN");
 		if (p == null) {
 			return;
 		}
+        
 		Engine engine = new Engine("CertStore");
-		try {
-			engine.getInstance("Collection", p,
-					new java.security.cert.CollectionCertStoreParameters());
-		} catch (NoSuchAlgorithmException e) {
-			fail(e.toString());
-		}
-	}
-	
-	public void testGetInstanceStringProvider2() {
-		Provider p = Security.getProvider("SUN");
-		if (p == null) {
-			return;
-		}
-		Engine engine = new Engine("CertStore");
-		try {
-			engine.getInstance("Collection", 
-					new java.security.cert.CollectionCertStoreParameters());
-		} catch (NoSuchAlgorithmException e) {
-			fail(e.toString());
-		}
+        engine.getInstance("Collection",
+                new java.security.cert.CollectionCertStoreParameters());
 	}
 	
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/MyProvider.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/MyProvider.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/MyProvider.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/MyProvider.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/MyProvider.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/MyProvider.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/MyProvider.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.fortress;
+package org.apache.harmony.security.tests.fortress;
 
 import java.security.Provider;
 
@@ -30,7 +30,7 @@
 public class MyProvider extends Provider {
 	MyProvider() {
 		super("MyProvider", 1.0, "Provider for testing");
-		put("Service.Algorithm", "org.apache.harmony.security.fortress.SomeClass");
+		put("Service.Algorithm", "org.apache.harmony.security.tests.fortress.SomeClass");
 	}
 		
 	MyProvider(String name, double version, String info) {

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/PolicyUtilsTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/PolicyUtilsTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/PolicyUtilsTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/PolicyUtilsTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/PolicyUtilsTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/PolicyUtilsTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/PolicyUtilsTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.fortress;
+package org.apache.harmony.security.tests.fortress;
 
 import java.io.File;
 import java.net.URL;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/ServicesTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/ServicesTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/ServicesTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/ServicesTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/ServicesTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/ServicesTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/ServicesTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.fortress;
+package org.apache.harmony.security.tests.fortress;
 
 import java.security.Provider;
 
@@ -44,7 +44,7 @@
 			fail("Service is null");
 		}
 		if (serv.getProvider() != p ||
-				! "org.apache.harmony.security.fortress.SomeClass".equals(serv.getClassName())) {
+				! "org.apache.harmony.security.tests.fortress.SomeClass".equals(serv.getClassName())) {
 			fail("Incorrect Service");
 		}
 		Services.updateServiceInfo(); // restore from registered providers

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/SomeClass.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/SomeClass.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/SomeClass.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/SomeClass.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/SomeClass.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/fortress/SomeClass.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/fortress/SomeClass.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.fortress;
+package org.apache.harmony.security.tests.fortress;
 
 public class SomeClass {
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/DRLCertFactoryTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/DRLCertFactoryTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/DRLCertFactoryTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/DRLCertFactoryTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/DRLCertFactoryTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/DRLCertFactoryTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/DRLCertFactoryTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.provider.cert;
+package org.apache.harmony.security.tests.provider.cert;
 
 import java.io.ByteArrayInputStream;
 import java.security.NoSuchProviderException;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLEntryImplTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLEntryImplTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLEntryImplTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLEntryImplTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLEntryImplTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLEntryImplTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLEntryImplTest.java Thu Jun  1 01:15:17 2006
@@ -19,12 +19,13 @@
  * @version $Revision$
  */
 
-package org.apache.harmony.security.provider.cert;
+package org.apache.harmony.security.tests.provider.cert;
 
 import java.math.BigInteger;
 import java.util.Date;
 import javax.security.auth.x500.X500Principal;
 
+import org.apache.harmony.security.provider.cert.X509CRLEntryImpl;
 import org.apache.harmony.security.x509.Extension;
 import org.apache.harmony.security.x509.Extensions;
 import org.apache.harmony.security.x509.TBSCertList;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLImplTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLImplTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLImplTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLImplTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLImplTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLImplTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLImplTest.java Thu Jun  1 01:15:17 2006
@@ -18,7 +18,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.provider.cert;
+package org.apache.harmony.security.tests.provider.cert;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -30,7 +30,6 @@
 import java.security.Signature;
 import java.security.cert.CRLException;
 import java.security.cert.CertificateFactory;
-import java.security.cert.X509CRLEntry;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
@@ -43,6 +42,8 @@
 import junit.framework.TestSuite;
 
 import org.apache.harmony.security.asn1.ASN1Integer;
+import org.apache.harmony.security.provider.cert.X509CRLImpl;
+import org.apache.harmony.security.provider.cert.X509CertImpl;
 import org.apache.harmony.security.x501.Name;
 import org.apache.harmony.security.x509.AlgorithmIdentifier;
 import org.apache.harmony.security.x509.AuthorityKeyIdentifier;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertFactoryImplTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertFactoryImplTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertFactoryImplTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertFactoryImplTest.java Thu Jun  1 01:15:17 2006
@@ -19,7 +19,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.provider.cert;
+package org.apache.harmony.security.tests.provider.cert;
 
 import java.io.ByteArrayInputStream;
 import java.security.cert.CRL;
@@ -30,7 +30,8 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 
-import org.apache.harmony.security.support.provider.cert.CertFactoryTestData;
+import org.apache.harmony.security.provider.cert.X509CertFactoryImpl;
+import org.apache.harmony.security.tests.support.provider.cert.CertFactoryTestData;
 
 import junit.framework.Test;
 import junit.framework.TestCase;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertFactoryPerfTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryPerfTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertFactoryPerfTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertFactoryPerfTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryPerfTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryPerfTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertFactoryPerfTest.java Thu Jun  1 01:15:17 2006
@@ -18,7 +18,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.provider.cert;
+package org.apache.harmony.security.tests.provider.cert;
 
 import java.io.*;
 import java.math.*;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertImplTest.java (from r410523, incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertImplTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertImplTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertImplTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertImplTest.java&r1=410523&r2=410788&rev=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertImplTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertImplTest.java Thu Jun  1 01:15:17 2006
@@ -18,7 +18,7 @@
 * @version $Revision$
 */
 
-package org.apache.harmony.security.provider.cert;
+package org.apache.harmony.security.tests.provider.cert;
 
 import java.io.*;
 import java.math.*;
@@ -43,7 +43,7 @@
 
 import org.apache.harmony.security.asn1.ASN1BitString;
 import org.apache.harmony.security.provider.cert.X509CertImpl;
-import org.apache.harmony.security.support.cert.TestUtils;
+import org.apache.harmony.security.tests.support.cert.TestUtils;
 import org.apache.harmony.security.x501.Name;
 import org.apache.harmony.security.x509.*;
 



Mime
View raw message