directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235328 [3/12] - in /directory/apacheds/trunk: server-annotations/src/main/java/org/apache/directory/server/annotations/ server-annotations/src/main/java/org/apache/directory/server/factory/ server-annotations/src/test/java/org/apache/dire...
Date Tue, 24 Jan 2012 16:22:36 GMT
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyIT.java Tue Jan 24 16:22:33 2012
@@ -111,83 +111,83 @@ import org.junit.runner.RunWith;
         "ou: SAP-AC",
         "administrativeRole: accessControlSpecificArea",
         "",
-          // Entry # 2
-          "dn: ou=SAP-CA,ou=SAP-AC,ou=system",
-          "ObjectClass: top",
-          "ObjectClass: organizationalUnit",
-          "ou: SAP-CA",
-          "administrativeRole: collectiveAttributeSpecificArea",
-          "",
-            // Entry # 3
-            "dn: ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: AAP",
-            "administrativeRole: autonomousArea",
-            "",
-              // Entry # 4
-              "dn: ou=IAP-CA,ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system",
-              "ObjectClass: top",
-              "ObjectClass: organizationalUnit",
-              "ou: IAP-CA",
-              "administrativeRole: collectiveAttributeInnerArea",
-              "",
-              // Entry # 5
-              "dn: ou=IAP-AC,ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system",
-              "ObjectClass: top",
-              "ObjectClass: organizationalUnit",
-              "ou: IAP-AC",
-              "administrativeRole: accessControlInnerArea",
-              "",
-              // Entry # 6
-              "dn: ou=IAP-TE,ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system",
-              "ObjectClass: top",
-              "ObjectClass: organizationalUnit",
-              "ou: IAP-TE",
-              "administrativeRole: triggerExecutionInnerArea",
-              "",
-          // Entry # 7
-          "dn: ou=AAP,ou=SAP-AC,ou=system",
-          "ObjectClass: top",
-          "ObjectClass: organizationalUnit",
-          "ou: AAP",
-          "administrativeRole: autonomousArea",
-          "",
-            // Entry # 8
-            "dn: ou=AAP,ou=AAP,ou=SAP-AC,ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: AAP",
-            "administrativeRole: autonomousArea",
-            "",
-            // Entry # 9
-            "dn: ou=SAP-AC,ou=AAP,ou=SAP-AC,ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: SAP-AC",
-            "administrativeRole: accessControlSpecificArea",
-            "",
-            // Entry # 10
-            "dn: ou=SAP-CA,ou=AAP,ou=SAP-AC,ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: SAP-CA",
-            "administrativeRole: collectiveAttributeSpecificArea",
-            "",
-            // Entry # 11
-            "dn: ou=IAP-AC,ou=AAP,ou=SAP-AC,ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: IAP-AC",
-            "administrativeRole: accessControlInnerArea",
-            "",
-            // Entry # 12
-            "dn: ou=IAP-CA,ou=AAP,ou=SAP-AC,ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: IAP-CA",
-            "administrativeRole: collectiveAttributeInnerArea",
-            "",
+        // Entry # 2
+        "dn: ou=SAP-CA,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: SAP-CA",
+        "administrativeRole: collectiveAttributeSpecificArea",
+        "",
+        // Entry # 3
+        "dn: ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: AAP",
+        "administrativeRole: autonomousArea",
+        "",
+        // Entry # 4
+        "dn: ou=IAP-CA,ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: IAP-CA",
+        "administrativeRole: collectiveAttributeInnerArea",
+        "",
+        // Entry # 5
+        "dn: ou=IAP-AC,ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: IAP-AC",
+        "administrativeRole: accessControlInnerArea",
+        "",
+        // Entry # 6
+        "dn: ou=IAP-TE,ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: IAP-TE",
+        "administrativeRole: triggerExecutionInnerArea",
+        "",
+        // Entry # 7
+        "dn: ou=AAP,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: AAP",
+        "administrativeRole: autonomousArea",
+        "",
+        // Entry # 8
+        "dn: ou=AAP,ou=AAP,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: AAP",
+        "administrativeRole: autonomousArea",
+        "",
+        // Entry # 9
+        "dn: ou=SAP-AC,ou=AAP,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: SAP-AC",
+        "administrativeRole: accessControlSpecificArea",
+        "",
+        // Entry # 10
+        "dn: ou=SAP-CA,ou=AAP,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: SAP-CA",
+        "administrativeRole: collectiveAttributeSpecificArea",
+        "",
+        // Entry # 11
+        "dn: ou=IAP-AC,ou=AAP,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: IAP-AC",
+        "administrativeRole: accessControlInnerArea",
+        "",
+        // Entry # 12
+        "dn: ou=IAP-CA,ou=AAP,ou=SAP-AC,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: IAP-CA",
+        "administrativeRole: collectiveAttributeInnerArea",
+        "",
         // Entry # 13
         "dn: ou=AAP,ou=system",
         "ObjectClass: top",
@@ -195,34 +195,34 @@ import org.junit.runner.RunWith;
         "ou: AAP",
         "administrativeRole: autonomousArea",
         "",
-          // Entry # 14
-          "dn: ou=AAP,ou=AAP,ou=system",
-          "ObjectClass: top",
-          "ObjectClass: organizationalUnit",
-          "ou: AAP",
-          "administrativeRole: autonomousArea",
-          "",
-            // Entry # 15
-            "dn: ou=AAP,ou=AAP,ou=AAP,ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: AAP",
-            "administrativeRole: autonomousArea",
-            "",
-            // Entry # 16
-            "dn: ou=SAP-CA,ou=AAP,ou=AAP,ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: SAP-CA",
-            "administrativeRole: collectiveAttributeSpecificArea",
-            "",
-            // Entry # 17
-            "dn: ou=IAP-CA,ou=AAP,ou=AAP,ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: IAP-CA",
-            "administrativeRole: collectiveAttributeInnerArea",
-            "",
+        // Entry # 14
+        "dn: ou=AAP,ou=AAP,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: AAP",
+        "administrativeRole: autonomousArea",
+        "",
+        // Entry # 15
+        "dn: ou=AAP,ou=AAP,ou=AAP,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: AAP",
+        "administrativeRole: autonomousArea",
+        "",
+        // Entry # 16
+        "dn: ou=SAP-CA,ou=AAP,ou=AAP,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: SAP-CA",
+        "administrativeRole: collectiveAttributeSpecificArea",
+        "",
+        // Entry # 17
+        "dn: ou=IAP-CA,ou=AAP,ou=AAP,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: IAP-CA",
+        "administrativeRole: collectiveAttributeInnerArea",
+        "",
         // Entry # 18
         "dn: ou=AAP1,ou=system",
         "ObjectClass: top",
@@ -230,88 +230,89 @@ import org.junit.runner.RunWith;
         "ou: AAP1",
         "administrativeRole: autonomousArea",
         "",
-          // Entry # 19
-          "dn: ou=AAP,ou=AAP1,ou=system",
-          "ObjectClass: top",
-          "ObjectClass: organizationalUnit",
-          "ou: AAP",
-          "administrativeRole: autonomousArea",
-          "",
-          // Entry # 20
-          "dn: ou=SAP-CA,ou=AAP1,ou=system",
-          "ObjectClass: top",
-          "ObjectClass: organizationalUnit",
-          "ou: SAP-CA",
-          "administrativeRole: collectiveAttributeSpecificArea",
-          "",
-          "",
-          // Entry # 21
-          "dn: ou=IAP-CA,ou=AAP1,ou=system",
-          "ObjectClass: top",
-          "ObjectClass: organizationalUnit",
-          "ou: IAP-CA",
-          "administrativeRole: collectiveAttributeInnerArea",
-          ""
-    })
+        // Entry # 19
+        "dn: ou=AAP,ou=AAP1,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: AAP",
+        "administrativeRole: autonomousArea",
+        "",
+        // Entry # 20
+        "dn: ou=SAP-CA,ou=AAP1,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: SAP-CA",
+        "administrativeRole: collectiveAttributeSpecificArea",
+        "",
+        "",
+        // Entry # 21
+        "dn: ou=IAP-CA,ou=AAP1,ou=system",
+        "ObjectClass: top",
+        "ObjectClass: organizationalUnit",
+        "ou: IAP-CA",
+        "administrativeRole: collectiveAttributeInnerArea",
+        ""
+})
 public class AdministrativePointModifyIT extends AbstractLdapTestUnit
 {
-    // The shared LDAP connection
-    private static LdapConnection connection;
+// The shared LDAP connection
+private static LdapConnection connection;
 
-    // A reference to the schema manager
-    private static SchemaManager schemaManager;
+// A reference to the schema manager
+private static SchemaManager schemaManager;
 
-    @Before
-    public void init() throws Exception
-    {
-        connection = IntegrationUtils.getAdminConnection( getService() );
-        schemaManager = getLdapServer().getDirectoryService().getSchemaManager();
-    }
 
+@Before
+public void init() throws Exception
+{
+    connection = IntegrationUtils.getAdminConnection( getService() );
+    schemaManager = getLdapServer().getDirectoryService().getSchemaManager();
+}
 
-    @After
-    public void shutdown() throws Exception
-    {
-        connection.close();
-    }
 
+@After
+public void shutdown() throws Exception
+{
+    connection.close();
+}
 
-    private Attribute getAdminRole( String dn ) throws Exception
-    {
-        Entry lookup = connection.lookup( dn, "administrativeRole" );
 
-        assertNotNull( lookup );
+private Attribute getAdminRole( String dn ) throws Exception
+{
+    Entry lookup = connection.lookup( dn, "administrativeRole" );
 
-        return lookup.get( "administrativeRole" );
-    }
+    assertNotNull( lookup );
+
+    return lookup.get( "administrativeRole" );
+}
 
 
-    // -------------------------------------------------------------------
-    // Test the Delete operation
-    // -------------------------------------------------------------------
-    /**
-     * Test the modification of an AAP role to a SAP role, with IAP below
-     */
-    @Test
-    public void testModifyAAPToSAPWithIAPBelow() throws Exception
-    {
-        assertTrue( getLdapServer().isStarted() );
+// -------------------------------------------------------------------
+// Test the Delete operation
+// -------------------------------------------------------------------
+/**
+ * Test the modification of an AAP role to a SAP role, with IAP below
+ */
+@Test
+public void testModifyAAPToSAPWithIAPBelow() throws Exception
+{
+    assertTrue( getLdapServer().isStarted() );
 
-        // Remove the AAP
-        Modification modificationDelAap = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
-            new DefaultAttribute( "administrativeRole" ) );
-        // Add the SAP
-        Modification modificationAddSap = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
-            new DefaultAttribute( "administrativeRole", "triggerExecutionSpecificArea" ) );
-        
-        try
-        {
-            connection.modify( "ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system", modificationDelAap, modificationAddSap );
-            fail();
-        }
-        catch ( LdapUnwillingToPerformException lutpe )
-        {
-            assertTrue( true );
-        }
+    // Remove the AAP
+    Modification modificationDelAap = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
+        new DefaultAttribute( "administrativeRole" ) );
+    // Add the SAP
+    Modification modificationAddSap = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
+        new DefaultAttribute( "administrativeRole", "triggerExecutionSpecificArea" ) );
+
+    try
+    {
+        connection.modify( "ou=AAP,ou=SAP-CA,ou=SAP-AC,ou=system", modificationDelAap, modificationAddSap );
+        fail();
     }
+    catch ( LdapUnwillingToPerformException lutpe )
+    {
+        assertTrue( true );
+    }
+}
 }

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java Tue Jan 24 16:22:33 2012
@@ -76,12 +76,11 @@ import org.junit.runner.RunWith;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(FrameworkRunner.class)
-    @CreateDS( 
-        name = "TestDS",
-        enableAccessControl = true
-        )
-    @CreateLdapServer(transports =
-        { @CreateTransport(protocol = "LDAP") })
+@CreateDS(
+    name = "TestDS",
+    enableAccessControl = true)
+@CreateLdapServer(transports =
+    { @CreateTransport(protocol = "LDAP") })
 @ApplyLdifs(
     {
         // Entry # 1
@@ -129,119 +128,120 @@ import org.junit.runner.RunWith;
         "ObjectClass: organizationalUnit",
         "ou: noAP4",
         ""
-    })
+})
 public class AdministrativePointPersistentIT extends AbstractLdapTestUnit
 {
-    // The shared LDAP connection
-    private static LdapConnection connection;
+// The shared LDAP connection
+private static LdapConnection connection;
 
-    // A reference to the schema manager
-    private static SchemaManager schemaManager;
+// A reference to the schema manager
+private static SchemaManager schemaManager;
 
-    @Before
-    public void init() throws Exception
-    {
-        getService().setAccessControlEnabled( true ); 
-        connection = IntegrationUtils.getAdminConnection( getService() );
-        schemaManager = getService().getSchemaManager();
-    }
 
+@Before
+public void init() throws Exception
+{
+    getService().setAccessControlEnabled( true );
+    connection = IntegrationUtils.getAdminConnection( getService() );
+    schemaManager = getService().getSchemaManager();
+}
 
-    @After
-    public void shutdown() throws Exception
-    {
-        connection.close();
-    }
 
+@After
+public void shutdown() throws Exception
+{
+    connection.close();
+}
 
-    private Attribute getAdminRole( String dn ) throws Exception
-    {
-        Entry lookup = connection.lookup( dn, "administrativeRole" );
 
-        assertNotNull( lookup );
+private Attribute getAdminRole( String dn ) throws Exception
+{
+    Entry lookup = connection.lookup( dn, "administrativeRole" );
+
+    assertNotNull( lookup );
 
-        return lookup.get( "administrativeRole" );
-    }
+    return lookup.get( "administrativeRole" );
+}
 
 
-    // -------------------------------------------------------------------
-    // Test the Add operation
-    // -------------------------------------------------------------------
-    /**
-     * Test the persistence of autonomous areas across a server stop and start
-     */
-    @Test
-    public void testPersistAutonomousArea() throws Exception
-    {
-        assertTrue( getLdapServer().isStarted() );
+// -------------------------------------------------------------------
+// Test the Add operation
+// -------------------------------------------------------------------
+/**
+ * Test the persistence of autonomous areas across a server stop and start
+ */
+@Test
+public void testPersistAutonomousArea() throws Exception
+{
+    assertTrue( getLdapServer().isStarted() );
+
+    // Stop the server now, we will restart it immediately 
+    getLdapServer().stop();
+    assertFalse( getLdapServer().isStarted() );
+
+    // And shutdown the DS too
+    getLdapServer().getDirectoryService().shutdown();
+    assertFalse( getLdapServer().getDirectoryService().isStarted() );
+
+    // And restart
+    getLdapServer().getDirectoryService().startup();
+    getLdapServer().start();
+    schemaManager = getLdapServer().getDirectoryService().getSchemaManager();
 
-        // Stop the server now, we will restart it immediately 
-        getLdapServer().stop();
-        assertFalse( getLdapServer().isStarted() );
-
-        // And shutdown the DS too
-        getLdapServer().getDirectoryService().shutdown();
-        assertFalse( getLdapServer().getDirectoryService().isStarted() );
-
-        // And restart
-        getLdapServer().getDirectoryService().startup();
-        getLdapServer().start();
-        schemaManager = getLdapServer().getDirectoryService().getSchemaManager();
-
-        assertTrue( getService().isStarted() );
-        assertTrue( getLdapServer().getDirectoryService().isStarted() );
-        
-        // Check that the roles are present
-        assertEquals( "autonomousArea", getAdminRole( "ou=AAP1,ou=noAP1,ou=system" ).getString() );
-        assertEquals( "autonomousArea", getAdminRole( "ou=AAP2,ou=system" ).getString() );
-        assertEquals( "autonomousArea", getAdminRole( "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ).getString() );
-
-        // Check the caches
-        DnNode<AccessControlAdministrativePoint> acCache = getLdapServer().getDirectoryService().getAccessControlAPCache();
-        DnNode<CollectiveAttributeAdministrativePoint> caCache = getLdapServer().getDirectoryService()
-            .getCollectiveAttributeAPCache();
-        DnNode<TriggerExecutionAdministrativePoint> teCache = getLdapServer().getDirectoryService()
-            .getTriggerExecutionAPCache();
-        DnNode<SubschemaAdministrativePoint> ssCache = getLdapServer().getDirectoryService().getSubschemaAPCache();
-
-        // The ACs
-        AdministrativePoint aap1 = acCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
-        assertNotNull( aap1 );
-
-        AdministrativePoint aap2 = acCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
-        assertNotNull( aap2 );
-
-        AdministrativePoint subAap1 = acCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
-        assertNotNull( subAap1 );
-
-        // The ACs
-        aap1 = caCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
-        assertNotNull( aap1 );
-
-        aap2 = caCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
-        assertNotNull( aap2 );
-
-        subAap1 = caCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
-        assertNotNull( subAap1 );
-
-        // The TEs
-        aap1 = teCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
-        assertNotNull( aap1 );
-
-        aap2 = teCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
-        assertNotNull( aap2 );
-
-        subAap1 = teCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
-        assertNotNull( subAap1 );
-
-        // The SSs
-        aap1 = ssCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
-        assertNotNull( aap1 );
-
-        aap2 = ssCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
-        assertNotNull( aap2 );
-
-        subAap1 = ssCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
-        assertNotNull( subAap1 );
-    }
+    assertTrue( getService().isStarted() );
+    assertTrue( getLdapServer().getDirectoryService().isStarted() );
+
+    // Check that the roles are present
+    assertEquals( "autonomousArea", getAdminRole( "ou=AAP1,ou=noAP1,ou=system" ).getString() );
+    assertEquals( "autonomousArea", getAdminRole( "ou=AAP2,ou=system" ).getString() );
+    assertEquals( "autonomousArea", getAdminRole( "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ).getString() );
+
+    // Check the caches
+    DnNode<AccessControlAdministrativePoint> acCache = getLdapServer().getDirectoryService().getAccessControlAPCache();
+    DnNode<CollectiveAttributeAdministrativePoint> caCache = getLdapServer().getDirectoryService()
+        .getCollectiveAttributeAPCache();
+    DnNode<TriggerExecutionAdministrativePoint> teCache = getLdapServer().getDirectoryService()
+        .getTriggerExecutionAPCache();
+    DnNode<SubschemaAdministrativePoint> ssCache = getLdapServer().getDirectoryService().getSubschemaAPCache();
+
+    // The ACs
+    AdministrativePoint aap1 = acCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
+    assertNotNull( aap1 );
+
+    AdministrativePoint aap2 = acCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
+    assertNotNull( aap2 );
+
+    AdministrativePoint subAap1 = acCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
+    assertNotNull( subAap1 );
+
+    // The ACs
+    aap1 = caCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
+    assertNotNull( aap1 );
+
+    aap2 = caCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
+    assertNotNull( aap2 );
+
+    subAap1 = caCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
+    assertNotNull( subAap1 );
+
+    // The TEs
+    aap1 = teCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
+    assertNotNull( aap1 );
+
+    aap2 = teCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
+    assertNotNull( aap2 );
+
+    subAap1 = teCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
+    assertNotNull( subAap1 );
+
+    // The SSs
+    aap1 = ssCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
+    assertNotNull( aap1 );
+
+    aap2 = ssCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
+    assertNotNull( aap2 );
+
+    subAap1 = ssCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
+    assertNotNull( subAap1 );
+}
 }

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java Tue Jan 24 16:22:33 2012
@@ -78,102 +78,102 @@ import org.junit.runner.RunWith;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class ) 
-@CreateDS( name="KeyDerivationServiceIT-class",
+@RunWith(FrameworkRunner.class)
+@CreateDS(name = "KeyDerivationServiceIT-class",
     partitions =
         {
             @CreatePartition(
                 name = "example",
                 suffix = "dc=example,dc=com",
-                contextEntry = @ContextEntry( 
+                contextEntry = @ContextEntry(
                     entryLdif =
-                        "dn: dc=example,dc=com\n" +
+                    "dn: dc=example,dc=com\n" +
                         "dc: example\n" +
                         "objectClass: top\n" +
-                        "objectClass: domain\n\n" ),
-                indexes = 
-                {
-                    @CreateIndex( attribute = "objectClass" ),
-                    @CreateIndex( attribute = "dc" ),
-                    @CreateIndex( attribute = "ou" )
-                } )
-        },
-        additionalInterceptors = 
+                        "objectClass: domain\n\n"),
+                indexes =
+                    {
+                        @CreateIndex(attribute = "objectClass"),
+                        @CreateIndex(attribute = "dc"),
+                        @CreateIndex(attribute = "ou")
+                })
+    },
+    additionalInterceptors =
         {
             KeyDerivationInterceptor.class
-        })
-@CreateLdapServer ( 
-    transports = 
-    {
-        @CreateTransport( protocol = "LDAP" )
+    })
+@CreateLdapServer(
+    transports =
+        {
+            @CreateTransport(protocol = "LDAP")
     },
-    saslHost="localhost",
-    saslMechanisms = 
-    {
-        @SaslMechanism( name=SupportedSaslMechanisms.PLAIN, implClass=PlainMechanismHandler.class ),
-        @SaslMechanism( name=SupportedSaslMechanisms.CRAM_MD5, implClass=CramMd5MechanismHandler.class),
-        @SaslMechanism( name=SupportedSaslMechanisms.DIGEST_MD5, implClass=DigestMd5MechanismHandler.class),
-        @SaslMechanism( name=SupportedSaslMechanisms.GSSAPI, implClass=GssapiMechanismHandler.class),
-        @SaslMechanism( name=SupportedSaslMechanisms.NTLM, implClass=NtlmMechanismHandler.class),
-        @SaslMechanism( name=SupportedSaslMechanisms.GSS_SPNEGO, implClass=NtlmMechanismHandler.class)
+    saslHost = "localhost",
+    saslMechanisms =
+        {
+            @SaslMechanism(name = SupportedSaslMechanisms.PLAIN, implClass = PlainMechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.CRAM_MD5, implClass = CramMd5MechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.DIGEST_MD5, implClass = DigestMd5MechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.GSSAPI, implClass = GssapiMechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.NTLM, implClass = NtlmMechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.GSS_SPNEGO, implClass = NtlmMechanismHandler.class)
     },
-    extendedOpHandlers = 
-    {
-        StoredProcedureExtendedOperationHandler.class
+    extendedOpHandlers =
+        {
+            StoredProcedureExtendedOperationHandler.class
     })
-public class KeyDerivationServiceIT extends AbstractLdapTestUnit 
+public class KeyDerivationServiceIT extends AbstractLdapTestUnit
 {
     private static final String RDN = "uid=hnelson,ou=users,dc=example,dc=com";
 
 
-     private void checkKeyNumber( Attributes attributes )
-     {
-         Attribute krb5key = attributes.get( "krb5key" );
-         
-         String vendor = System.getProperty( "java.vm.vendor" );
-         
-         if ( vendor.equalsIgnoreCase( "IBM Corporation") )
-         {
-             // Will be 2 or 3 on IBM JRE whether AES-256 is enabled or not
-             assertTrue( "Number of keys", krb5key.size() > 1 );
-         }
-         else if ( vendor.equalsIgnoreCase( "Sun Microsystems Inc." ) )
-         {
-             // Could be 4 or 5 depending on whether AES-256 is enabled or not, on SUN JRE
-             assertTrue( "Number of keys", krb5key.size() > 3 );
-         }
-         else if ( vendor.equalsIgnoreCase( "BEA Systems, Inc." ) )
-         {
-             // Could be 4 or 5 depending on whether AES-256 is enabled or not, on BEA JRockit
-             assertTrue( "Number of keys", krb5key.size() > 3 );
-         }
-         else if ( vendor.equalsIgnoreCase( "Oracle Corporation" ) )
-         {
-             // Could be 4 or 5 depending on whether AES-256 is enabled or not, on Oracle JRockit
-             assertTrue( "Number of keys", krb5key.size() > 3 );
-         }
-         else if ( vendor.equalsIgnoreCase( "Apple Inc." ) )
-         {
-             // Could be 4 or 5 depending on whether AES-256 is enabled or not, on Apple JVM
-             assertTrue( "Number of keys", krb5key.size() > 3 );
-         }
-         else if ( vendor.equalsIgnoreCase( "Apple Inc." ) )
-         {
-             // Could be 4 or 5 depending on whether AES-256 is enabled or not, on Apple JVM
-             assertTrue( "Number of keys", krb5key.size() > 3 );
-         }
-         else if ( vendor.equalsIgnoreCase( "\"Apple Computer, Inc.\"" ) )
-         {
-             // Could be 4 or 5 depending on whether AES-256 is enabled or not, on Apple JVM
-             assertTrue( "Number of keys", krb5key.size() > 3 );
-         }
-         else
-         {
-             fail( "Unkown JVM" );
-         }
-     }
-     
-     
+    private void checkKeyNumber( Attributes attributes )
+    {
+        Attribute krb5key = attributes.get( "krb5key" );
+
+        String vendor = System.getProperty( "java.vm.vendor" );
+
+        if ( vendor.equalsIgnoreCase( "IBM Corporation" ) )
+        {
+            // Will be 2 or 3 on IBM JRE whether AES-256 is enabled or not
+            assertTrue( "Number of keys", krb5key.size() > 1 );
+        }
+        else if ( vendor.equalsIgnoreCase( "Sun Microsystems Inc." ) )
+        {
+            // Could be 4 or 5 depending on whether AES-256 is enabled or not, on SUN JRE
+            assertTrue( "Number of keys", krb5key.size() > 3 );
+        }
+        else if ( vendor.equalsIgnoreCase( "BEA Systems, Inc." ) )
+        {
+            // Could be 4 or 5 depending on whether AES-256 is enabled or not, on BEA JRockit
+            assertTrue( "Number of keys", krb5key.size() > 3 );
+        }
+        else if ( vendor.equalsIgnoreCase( "Oracle Corporation" ) )
+        {
+            // Could be 4 or 5 depending on whether AES-256 is enabled or not, on Oracle JRockit
+            assertTrue( "Number of keys", krb5key.size() > 3 );
+        }
+        else if ( vendor.equalsIgnoreCase( "Apple Inc." ) )
+        {
+            // Could be 4 or 5 depending on whether AES-256 is enabled or not, on Apple JVM
+            assertTrue( "Number of keys", krb5key.size() > 3 );
+        }
+        else if ( vendor.equalsIgnoreCase( "Apple Inc." ) )
+        {
+            // Could be 4 or 5 depending on whether AES-256 is enabled or not, on Apple JVM
+            assertTrue( "Number of keys", krb5key.size() > 3 );
+        }
+        else if ( vendor.equalsIgnoreCase( "\"Apple Computer, Inc.\"" ) )
+        {
+            // Could be 4 or 5 depending on whether AES-256 is enabled or not, on Apple JVM
+            assertTrue( "Number of keys", krb5key.size() > 3 );
+        }
+        else
+        {
+            fail( "Unkown JVM" );
+        }
+    }
+
+
     /**
      * Set up a partition for EXAMPLE.COM, add the Key Derivation interceptor, enable
      * the krb5kdc schema, and add a user principal to test authentication with.
@@ -190,7 +190,7 @@ public class KeyDerivationServiceIT exte
         // check if krb5kdc is disabled
         Attributes krb5kdcAttrs = schemaRoot.getAttributes( "cn=Krb5kdc" );
         boolean isKrb5KdcDisabled = false;
-        
+
         if ( krb5kdcAttrs.get( "m-disabled" ) != null )
         {
             isKrb5KdcDisabled = ( ( String ) krb5kdcAttrs.get( "m-disabled" ).get() ).equalsIgnoreCase( "TRUE" );
@@ -278,7 +278,8 @@ public class KeyDerivationServiceIT exte
 
         if ( attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ) != null )
         {
-            keyVersionNumber = Integer.valueOf( ( String ) attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
+            keyVersionNumber = Integer.valueOf( ( String ) attributes
+                .get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
         }
 
         assertEquals( "Key version number", 0, keyVersionNumber );
@@ -293,7 +294,7 @@ public class KeyDerivationServiceIT exte
      * @throws NamingException failure to perform LDAP operations
      * @throws IOException on network errors
      */
-     @Test
+    @Test
     public void testModifyDerivedKeys() throws NamingException, KerberosException
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
@@ -353,7 +354,8 @@ public class KeyDerivationServiceIT exte
 
         if ( attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ) != null )
         {
-            keyVersionNumber = Integer.valueOf( ( String ) attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
+            keyVersionNumber = Integer.valueOf( ( String ) attributes
+                .get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
         }
 
         assertEquals( "Key version number", 1, keyVersionNumber );
@@ -384,7 +386,8 @@ public class KeyDerivationServiceIT exte
 
         if ( attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ) != null )
         {
-            keyVersionNumber = Integer.valueOf( ( String ) attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
+            keyVersionNumber = Integer.valueOf( ( String ) attributes
+                .get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
         }
 
         assertEquals( "Key version number", 2, keyVersionNumber );
@@ -415,7 +418,8 @@ public class KeyDerivationServiceIT exte
 
         if ( attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ) != null )
         {
-            keyVersionNumber = Integer.valueOf( ( String ) attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
+            keyVersionNumber = Integer.valueOf( ( String ) attributes
+                .get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
         }
 
         assertEquals( "Key version number", 3, keyVersionNumber );
@@ -431,7 +435,7 @@ public class KeyDerivationServiceIT exte
      * @throws NamingException failure to perform LDAP operations
      * @throws IOException on network errors
      */
-     @Test
+    @Test
     public void testModifyDerivedKeysWithoutPrincipalName() throws NamingException, KerberosException
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
@@ -488,7 +492,8 @@ public class KeyDerivationServiceIT exte
 
         if ( attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ) != null )
         {
-            keyVersionNumber = Integer.valueOf( ( String ) attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
+            keyVersionNumber = Integer.valueOf( ( String ) attributes
+                .get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
         }
 
         assertEquals( "Key version number", 1, keyVersionNumber );
@@ -517,7 +522,8 @@ public class KeyDerivationServiceIT exte
 
         if ( attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ) != null )
         {
-            keyVersionNumber = Integer.valueOf( ( String ) attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
+            keyVersionNumber = Integer.valueOf( ( String ) attributes
+                .get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
         }
 
         assertEquals( "Key version number", 2, keyVersionNumber );
@@ -546,7 +552,8 @@ public class KeyDerivationServiceIT exte
 
         if ( attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ) != null )
         {
-            keyVersionNumber = Integer.valueOf( ( String ) attributes.get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
+            keyVersionNumber = Integer.valueOf( ( String ) attributes
+                .get( KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT ).get() );
         }
 
         assertEquals( "Key version number", 3, keyVersionNumber );
@@ -561,12 +568,13 @@ public class KeyDerivationServiceIT exte
      * @throws IOException on network errors
      * @throws InvalidKeyException if the incorrect key results
      */
-     @Test
+    @Test
     public void testAddRandomKeys() throws NamingException, KerberosException, InvalidKeyException
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldap://localhost:" + getLdapServer().getPort() + "/ou=users,dc=example,dc=com" );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + getLdapServer().getPort()
+            + "/ou=users,dc=example,dc=com" );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
         env.put( "java.naming.security.credentials", "secret" );
         env.put( "java.naming.security.authentication", "simple" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java Tue Jan 24 16:22:33 2012
@@ -62,53 +62,53 @@ import org.junit.runner.RunWith;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class ) 
-@CreateDS( allowAnonAccess=true, name="PasswordPolicyServiceIT-class",
+@RunWith(FrameworkRunner.class)
+@CreateDS(allowAnonAccess = true, name = "PasswordPolicyServiceIT-class",
     partitions =
         {
             @CreatePartition(
                 name = "example",
                 suffix = "dc=example,dc=com",
-                contextEntry = @ContextEntry( 
+                contextEntry = @ContextEntry(
                     entryLdif =
-                        "dn: dc=example,dc=com\n" +
+                    "dn: dc=example,dc=com\n" +
                         "dc: example\n" +
                         "objectClass: top\n" +
-                        "objectClass: domain\n\n" ),
-                indexes = 
-                {
-                    @CreateIndex( attribute = "objectClass" ),
-                    @CreateIndex( attribute = "dc" ),
-                    @CreateIndex( attribute = "ou" )
-                } )
-        })
-@CreateLdapServer ( 
-    transports = 
-    {
-        @CreateTransport( protocol = "LDAP" )
+                        "objectClass: domain\n\n"),
+                indexes =
+                    {
+                        @CreateIndex(attribute = "objectClass"),
+                        @CreateIndex(attribute = "dc"),
+                        @CreateIndex(attribute = "ou")
+                })
+    })
+@CreateLdapServer(
+    transports =
+        {
+            @CreateTransport(protocol = "LDAP")
     },
-    saslHost="localhost",
-    saslMechanisms = 
-    {
-        @SaslMechanism( name=SupportedSaslMechanisms.PLAIN, implClass=PlainMechanismHandler.class ),
-        @SaslMechanism( name=SupportedSaslMechanisms.CRAM_MD5, implClass=CramMd5MechanismHandler.class),
-        @SaslMechanism( name= SupportedSaslMechanisms.DIGEST_MD5, implClass=DigestMd5MechanismHandler.class),
-        @SaslMechanism( name=SupportedSaslMechanisms.GSSAPI, implClass=GssapiMechanismHandler.class),
-        @SaslMechanism( name=SupportedSaslMechanisms.NTLM, implClass=NtlmMechanismHandler.class),
-        @SaslMechanism( name=SupportedSaslMechanisms.GSS_SPNEGO, implClass=NtlmMechanismHandler.class)
+    saslHost = "localhost",
+    saslMechanisms =
+        {
+            @SaslMechanism(name = SupportedSaslMechanisms.PLAIN, implClass = PlainMechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.CRAM_MD5, implClass = CramMd5MechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.DIGEST_MD5, implClass = DigestMd5MechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.GSSAPI, implClass = GssapiMechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.NTLM, implClass = NtlmMechanismHandler.class),
+            @SaslMechanism(name = SupportedSaslMechanisms.GSS_SPNEGO, implClass = NtlmMechanismHandler.class)
     },
-    extendedOpHandlers = 
-    {
-        StoredProcedureExtendedOperationHandler.class
+    extendedOpHandlers =
+        {
+            StoredProcedureExtendedOperationHandler.class
     })
-@Ignore( "This test case is no loger useful cause we removed PasswordPolicyInterceptor, instead look at PasswordPolicyTest" )
+@Ignore("This test case is no loger useful cause we removed PasswordPolicyInterceptor, instead look at PasswordPolicyTest")
 //WARN: this test class will be removed soon
 public class PasswordPolicyServiceIT extends AbstractLdapTestUnit
 {
     private DirContext ctx;
     private DirContext users;
-    
-    
+
+
     /**
      * Set up a partition for EXAMPLE.COM
      */
@@ -128,7 +128,7 @@ public class PasswordPolicyServiceIT ext
         users = ctx.createSubcontext( "ou=users", attrs );
     }
 
-    
+
     /**
      * Tests that passwords that are too short are properly rejected. 
      */

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddAliasIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddAliasIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddAliasIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddAliasIT.java Tue Jan 24 16:22:33 2012
@@ -45,15 +45,16 @@ import org.junit.runner.RunWith;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(FrameworkRunner.class)
-@CreateDS( 
+@CreateDS(
     enableChangeLog = false,
-    name = "DSAddAlias" )
+    name = "DSAddAlias")
 @CreateLdapServer(transports =
     { @CreateTransport(protocol = "LDAP") })
 public class AddAliasIT extends AbstractLdapTestUnit
 {
     private LdapConnection conn;
 
+
     @Test
     public void testAddAliasOnParent() throws Exception
     {
@@ -61,25 +62,25 @@ public class AddAliasIT extends Abstract
         {
             conn = getAdminConnection( getLdapServer() );
             conn.setTimeOut( -1L );
-            
-            conn.add( new DefaultEntry( 
-                "cn=foo,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "cn=foo,ou=system",
                 "objectClass: person",
                 "objectClass: top",
                 "cn: foo",
                 "sn: Foo" ) );
-    
+
             assertNotNull( conn.lookup( "cn=foo,ou=system" ) );
-    
-            conn.add( new DefaultEntry( 
-                "ou=alias,cn=foo,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "ou=alias,cn=foo,ou=system",
                 "objectClass: top",
                 "objectClass: extensibleObject",
                 "objectClass: alias",
-                "ou: alias" ,
+                "ou: alias",
                 "aliasedObjectName: cn=foo,ou=system",
                 "description: alias to father (branch)" ) );
-    
+
             assertNotNull( conn.lookup( "ou=alias,cn=foo,ou=system" ) );
         }
         finally
@@ -89,8 +90,7 @@ public class AddAliasIT extends Abstract
             conn.delete( "cn=foo,ou=system" );
         }
     }
-    
-    
+
 
     @Test
     public void testAddAliasWithSubordinate() throws Exception
@@ -99,37 +99,37 @@ public class AddAliasIT extends Abstract
         {
             conn = getAdminConnection( getLdapServer() );
             conn.setTimeOut( -1L );
-            
-            conn.add( new DefaultEntry( 
-                "cn=foo,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "cn=foo,ou=system",
                 "objectClass: person",
                 "objectClass: top",
                 "cn: foo",
                 "sn: Foo" ) );
-    
+
             assertNotNull( conn.lookup( "cn=foo,ou=system" ) );
-    
-            conn.add( new DefaultEntry( 
-                "ou=alias,cn=foo,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "ou=alias,cn=foo,ou=system",
                 "objectClass: top",
                 "objectClass: extensibleObject",
                 "objectClass: alias",
-                "ou: alias" ,
+                "ou: alias",
                 "aliasedObjectName: cn=foo,ou=system",
                 "description: alias to father (branch)" ) );
-    
+
             assertNotNull( conn.lookup( "ou=alias,cn=foo,ou=system" ) );
-    
+
             try
             {
-                conn.add( new DefaultEntry( 
-                    "ou=aliasChild,ou=alias,cn=foo,ou=system", 
+                conn.add( new DefaultEntry(
+                    "ou=aliasChild,ou=alias,cn=foo,ou=system",
                     "objectClass: top",
                     "objectClass: extensibleObject",
                     "objectClass: alias",
-                    "ou: aliasChild" ,
+                    "ou: aliasChild",
                     "aliasedObjectName: cn=foo,ou=system" ) );
-                
+
                 fail();
             }
             catch ( Exception e )
@@ -137,7 +137,7 @@ public class AddAliasIT extends Abstract
                 e.printStackTrace();
                 assertTrue( true );
             }
-    
+
             assertNotNull( conn.lookup( "ou=alias,cn=foo,ou=system" ) );
             assertNull( conn.lookup( "ou=aliasChild,ou=alias,cn=foo,ou=system" ) );
         }
@@ -149,7 +149,7 @@ public class AddAliasIT extends Abstract
         }
     }
 
-    
+
     /**
      * Add aliases with a cycle :
      * ou=system
@@ -166,30 +166,30 @@ public class AddAliasIT extends Abstract
         {
             conn = getAdminConnection( getLdapServer() );
             conn.setTimeOut( -1L );
-            
-            conn.add( new DefaultEntry( 
-                "cn=test,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "cn=test,ou=system",
                 "objectClass: person",
                 "objectClass: top",
                 "cn: test",
                 "sn: Test" ) );
-            
-            conn.add( new DefaultEntry( 
-                "cn=foo,cn=test,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "cn=foo,cn=test,ou=system",
                 "objectClass: person",
                 "objectClass: top",
                 "cn: foo",
                 "sn: Foo" ) );
-    
-            conn.add( new DefaultEntry( 
-                "cn=bar,cn=test,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "cn=bar,cn=test,ou=system",
                 "objectClass: person",
                 "objectClass: top",
                 "cn: bar",
                 "sn: Bar" ) );
-            
-            conn.add( new DefaultEntry( 
-                "cn=doh,cn=test,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "cn=doh,cn=test,ou=system",
                 "objectClass: person",
                 "objectClass: top",
                 "cn: doh",
@@ -197,31 +197,31 @@ public class AddAliasIT extends Abstract
 
             //assertNotNull( conn.lookup( "cn=foo,cn=test,ou=system" ) );
             //assertNotNull( conn.lookup( "cn=bar,cn=test,ou=system" ) );
-    
-            conn.add( new DefaultEntry( 
-                "cn=barAlias,cn=foo,cn=test,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "cn=barAlias,cn=foo,cn=test,ou=system",
                 "objectClass: top",
                 "objectClass: extensibleObject",
                 "objectClass: alias",
-                "cn: barAlias" ,
+                "cn: barAlias",
                 "aliasedObjectName: cn=bar,cn=test,ou=system",
                 "description: alias to father (branch)" ) );
-            
-            conn.add( new DefaultEntry( 
-                "cn=dohAlias,cn=bar,cn=test,ou=system", 
+
+            conn.add( new DefaultEntry(
+                "cn=dohAlias,cn=bar,cn=test,ou=system",
                 "objectClass: top",
                 "objectClass: extensibleObject",
                 "objectClass: alias",
-                "cn: dohAlias" ,
+                "cn: dohAlias",
                 "aliasedObjectName: cn=doh,cn=test,ou=system",
                 "description: alias to father (branch)" ) );
 
             //assertNotNull( conn.lookup( "cn=barAlias,cn=foo,cn=test,ou=system" ) );
             //assertNotNull( conn.lookup( "cn=fooAlias,cn=bar,cn=test,ou=system" ) );
-            
+
             // Now, do a search
             EntryCursor cursor = conn.search( "cn=foo,cn=test,ou=system", "(objectClass=*)", SearchScope.SUBTREE, "*" );
-            
+
             while ( cursor.next() )
             {
                 System.out.println( cursor.get().getDn() );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java Tue Jan 24 16:22:33 2012
@@ -115,10 +115,10 @@ import org.slf4j.LoggerFactory;
                     "objectClass: top\n" +
                     "objectClass: domain\n\n"),
             indexes =
-            {
-                @CreateIndex(attribute = "objectClass"),
-                @CreateIndex(attribute = "dc"),
-                @CreateIndex(attribute = "ou")
+                {
+                    @CreateIndex(attribute = "objectClass"),
+                    @CreateIndex(attribute = "dc"),
+                    @CreateIndex(attribute = "ou")
             }),
 
         @CreatePartition(
@@ -130,13 +130,13 @@ import org.slf4j.LoggerFactory;
                     "objectClass: top\n" +
                     "objectClass: domain\n\n"),
             indexes =
-            {
-                @CreateIndex(attribute = "objectClass"),
-                @CreateIndex(attribute = "dc"),
-                @CreateIndex(attribute = "ou")
+                {
+                    @CreateIndex(attribute = "objectClass"),
+                    @CreateIndex(attribute = "dc"),
+                    @CreateIndex(attribute = "ou")
             }) })
-@CreateLdapServer( name = "ADDIT",  transports =
-    { @CreateTransport(protocol = "LDAP", port = -1 ) })
+@CreateLdapServer(name = "ADDIT", transports =
+    { @CreateTransport(protocol = "LDAP", port = -1) })
 @ApplyLdifs(
     {
         // Entry # 0
@@ -195,7 +195,7 @@ public class AddIT extends AbstractLdapT
 
         // modify object classes, add two more
         Attributes attributes = LdifUtils.createJndiAttributes( "objectClass: organizationalPerson",
-                "objectClass: inetOrgPerson" );
+            "objectClass: inetOrgPerson" );
 
         DirContext person = ( DirContext ) ctx.lookup( RDN );
         person.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, attributes );
@@ -704,16 +704,17 @@ public class AddIT extends AbstractLdapT
         addRequest.addControl( manageDSAIT );
 
         // add success
-        Entry entry = new DefaultEntry( "ou=UnderReferral,uid=akarasuluref,ou=users,ou=system", 
+        Entry entry = new DefaultEntry( "ou=UnderReferral,uid=akarasuluref,ou=users,ou=system",
             "objectClass", "organizationalUnit",
             "ou", "UnderReferral" );
-        
+
         addRequest.setEntry( entry );
 
         AddResponse addResponse = conn.add( addRequest );
         assertEquals( ResultCodeEnum.REFERRAL, addResponse.getLdapResult().getResultCode() );
 
-        assertNull( conn.lookup( "ou=UnderReferral,uid=akarasuluref,ou=users,ou=system", new Control[]{ manageDSAIT } ) );
+        assertNull( conn.lookup( "ou=UnderReferral,uid=akarasuluref,ou=users,ou=system", new Control[]
+            { manageDSAIT } ) );
 
         conn.close();
     }
@@ -783,8 +784,8 @@ public class AddIT extends AbstractLdapT
         AddRequest addRequest = new AddRequestImpl();
 
         // referrals failure
-        Entry entry = new DefaultEntry( 
-            "ou=UnderReferral,ou=Computers,uid=akarasuluref,ou=users,ou=system", 
+        Entry entry = new DefaultEntry(
+            "ou=UnderReferral,ou=Computers,uid=akarasuluref,ou=users,ou=system",
             "objectClass", "organizationalUnit",
             "ou", "UnderReferral" );
         addRequest.setEntry( entry );
@@ -793,9 +794,12 @@ public class AddIT extends AbstractLdapT
 
         assertEquals( ResultCodeEnum.REFERRAL, addResponse.getLdapResult().getResultCode() );
 
-        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls().contains( "ldap://localhost:10389/ou=UnderReferral,ou=Computers,uid=akarasulu,ou=users,ou=system" ) );
-        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls().contains( "ldap://foo:10389/ou=UnderReferral,ou=Computers,uid=akarasulu,ou=users,ou=system" ) );
-        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls().contains( "ldap://bar:10389/ou=UnderReferral,ou=Computers,uid=akarasulu,ou=users,ou=system" ) );
+        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls()
+            .contains( "ldap://localhost:10389/ou=UnderReferral,ou=Computers,uid=akarasulu,ou=users,ou=system" ) );
+        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls()
+            .contains( "ldap://foo:10389/ou=UnderReferral,ou=Computers,uid=akarasulu,ou=users,ou=system" ) );
+        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls()
+            .contains( "ldap://bar:10389/ou=UnderReferral,ou=Computers,uid=akarasulu,ou=users,ou=system" ) );
 
         conn.close();
     }
@@ -817,20 +821,23 @@ public class AddIT extends AbstractLdapT
         //addRequest.addControl( manageDSAIT );
 
         // referrals failure
-        Entry entry = new DefaultEntry( 
-            "ou=UnderReferral,uid=akarasuluref,ou=users,ou=system", 
+        Entry entry = new DefaultEntry(
+            "ou=UnderReferral,uid=akarasuluref,ou=users,ou=system",
             "objectClass", "organizationalUnit",
             "ou", "UnderReferral" );
-        
+
         addRequest.setEntry( entry );
 
         AddResponse addResponse = conn.add( addRequest );
 
         assertEquals( ResultCodeEnum.REFERRAL, addResponse.getLdapResult().getResultCode() );
 
-        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls().contains( "ldap://localhost:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system" ) );
-        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls().contains( "ldap://foo:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system" ) );
-        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls().contains( "ldap://bar:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system" ) );
+        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls()
+            .contains( "ldap://localhost:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system" ) );
+        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls()
+            .contains( "ldap://foo:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system" ) );
+        assertTrue( addResponse.getLdapResult().getReferral().getLdapUrls()
+            .contains( "ldap://bar:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system" ) );
 
         conn.close();
     }
@@ -886,7 +893,7 @@ public class AddIT extends AbstractLdapT
         attrs.put( "cn", "Jim, Bean" );
 
         DirContext jimBeanCtx = ctx.createSubcontext( "cn=\"Jim, Bean\"", attrs );
-        
+
         assertNotNull( jimBeanCtx );
     }
 
@@ -1329,10 +1336,10 @@ public class AddIT extends AbstractLdapT
      * @throws NamingException 
      */
     @Test
-    @CreateDS( 
+    @CreateDS(
         enableChangeLog = false,
-        name = "DSAlias" )
-    @CreateLdapServer( name = "DSAlias", transports =
+        name = "DSAlias")
+    @CreateLdapServer(name = "DSAlias", transports =
         { @CreateTransport(protocol = "LDAP", port = -1) })
     public void test_DIRSERVER_1357() throws Exception
     {
@@ -1367,6 +1374,7 @@ public class AddIT extends AbstractLdapT
         ctx.destroySubcontext( "cn=alias,ou=engineering" );
     }
 
+
     /**
      * Adding an entry with a non existing attribute type.
      * 
@@ -1389,9 +1397,9 @@ public class AddIT extends AbstractLdapT
         try
         {
             connection.add( personEntry );
-            fail("should throw LdapNoSuchAttributeException");
+            fail( "should throw LdapNoSuchAttributeException" );
         }
-        catch( LdapNoSuchAttributeException e )
+        catch ( LdapNoSuchAttributeException e )
         {
             //expected exception
         }
@@ -1408,7 +1416,7 @@ public class AddIT extends AbstractLdapT
      * 
      * @throws Exception 
      */
-    @Test( expected = LdapOperationException.class )
+    @Test(expected = LdapOperationException.class)
     public void testAddEntryNonExistingOC() throws Exception
     {
         LdapConnection connection = getAdminConnection( getLdapServer() );
@@ -1430,41 +1438,41 @@ public class AddIT extends AbstractLdapT
      * 
      * @throws Exception 
      */
-    @Test( expected = LdapException.class )
+    @Test(expected = LdapException.class)
     public void testAddEntry100KData() throws Exception
     {
         LdapConnection connection = getAdminConnection( getLdapServer() );
 
-        int size = 100*1024;
+        int size = 100 * 1024;
         byte[] dataBytes = new byte[size];
-        
-        for ( int i = 0; i < size; i++)
+
+        for ( int i = 0; i < size; i++ )
         {
             dataBytes[i] = 'A';
         }
-        
+
         String data = Strings.utf8ToString( dataBytes );
 
         Dn dn = new Dn( "cn=Kate Bush," + BASE );
-        
+
         Entry personEntry = new DefaultEntry( "cn=Kate Bush," + BASE,
-        "objectClass: top",
-        "objectClass: person",
-        "cn: Kate Bush",
-        "sn: Bush",
-        "description", data );
+            "objectClass: top",
+            "objectClass: person",
+            "cn: Kate Bush",
+            "sn: Bush",
+            "description", data );
 
         connection.add( personEntry );
-        
+
         // Check that the entry has been stored 
         Entry entry = connection.lookup( dn, "description", "cn", "sn" );
-        
+
         String description = entry.get( "description" ).getString();
-        
+
         assertNotNull( description );
         assertTrue( description.startsWith( "AAA" ) );
         assertEquals( size, description.length() );
-        
+
         for ( int i = 0; i < size; i++ )
         {
             assertEquals( 'A', description.charAt( i ) );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java Tue Jan 24 16:22:33 2012
@@ -94,7 +94,7 @@ public class AddingEntriesWithSpecialCha
         EntryCursor cursor = connection.search( "ou=system", "(cn=Kate#Bush)", SearchScope.SUBTREE, "*" );
 
         boolean entryFound = false;
-        
+
         while ( cursor.next() )
         {
             Entry entry = cursor.get();
@@ -131,7 +131,7 @@ public class AddingEntriesWithSpecialCha
         EntryCursor cursor = connection.search( "ou=system", "(cn=Bush, Kate)", SearchScope.SUBTREE, "*" );
 
         boolean entryFound = false;
-        
+
         while ( cursor.next() )
         {
             Entry sr = cursor.get();
@@ -167,7 +167,7 @@ public class AddingEntriesWithSpecialCha
         EntryCursor cursor = connection.search( "ou=system", "(cn=Mackie \"The Knife\" Messer)",
             SearchScope.SUBTREE, "*" );
         boolean entryFound = false;
-        
+
         while ( cursor.next() )
         {
             Entry sr = cursor.get();
@@ -237,7 +237,7 @@ public class AddingEntriesWithSpecialCha
             .search( "ou=system", "(ou=East -> West)", SearchScope.SUBTREE, "*" );
 
         boolean entryFound = false;
-        
+
         while ( cursor.next() )
         {
             Entry sr = cursor.get();
@@ -274,7 +274,7 @@ public class AddingEntriesWithSpecialCha
         EntryCursor cursor = connection.search( "ou=system", "(ou=Scissors 8<)", SearchScope.SUBTREE, "*" );
 
         boolean entryFound = false;
-        
+
         while ( cursor.next() )
         {
             Entry sr = cursor.get();
@@ -313,7 +313,7 @@ public class AddingEntriesWithSpecialCha
             "*" );
 
         boolean entryFound = false;
-        
+
         while ( cursor.next() )
         {
             Entry sr = cursor.get();
@@ -367,33 +367,33 @@ public class AddingEntriesWithSpecialCha
         connection.delete( dn );
         connection.close();
     }
-    
-    
+
+
     @Test
-    public void testAddRdnWithEscapedSpaces() throws Exception 
+    public void testAddRdnWithEscapedSpaces() throws Exception
     {
         LdapConnection connection = getAdminConnection( getLdapServer() );
         connection.setTimeOut( -1 );
 
-        Entry entry = new DefaultEntry( 
+        Entry entry = new DefaultEntry(
             "cn=\\ User, ou=system",
             "objectClass: top",
             "objectClass: person",
             "objectClass: organizationalPerson",
-            "objectClass: inetOrgPerson", 
+            "objectClass: inetOrgPerson",
             "cn:  User",
             "sn:  Name " );
 
         connection.add( entry );
-        
+
         Entry addedEntry = connection.lookup( "cn=\\ User, ou=system" );
-        
+
         assertNotNull( addedEntry );
-        
+
         assertEquals( "Name", addedEntry.get( "sn" ).getString() );
         assertEquals( "User", addedEntry.get( "cn" ).getString() );
         assertEquals( 1, addedEntry.get( "cn" ).size() );
         assertTrue( addedEntry.contains( "cn", "User" ) );
         assertFalse( addedEntry.contains( "cn", " User" ) );
-      } 
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java Tue Jan 24 16:22:33 2012
@@ -80,8 +80,8 @@ import org.junit.runner.RunWith;
 @CreateDS(allowAnonAccess = true, name = "BindIT-class")
 @CreateLdapServer(
     transports =
-    {
-        @CreateTransport(protocol = "LDAP")
+        {
+            @CreateTransport(protocol = "LDAP")
     })
 public class BindIT extends AbstractLdapTestUnit
 {
@@ -95,7 +95,7 @@ public class BindIT extends AbstractLdap
      * 
      * @throws Exception 
      */
-    @Test( expected=LdapAuthenticationException.class )
+    @Test(expected = LdapAuthenticationException.class)
     public void testBadBindDnNotInContext() throws Exception
     {
         getWiredConnection( getLdapServer(), "cn=bogus", "blah" );
@@ -106,19 +106,20 @@ public class BindIT extends AbstractLdap
     /**
      * Test bind with malformed bind Dn.
      */
-    @Test( expected=LdapInvalidDnException.class )
+    @Test(expected = LdapInvalidDnException.class)
     public void testBadBindDnMalformed() throws Exception
     {
         getWiredConnection( getLdapServer(), "system", "blah" );
         fail( "should never get here due to a " );
     }
 
+
     /**
      * Test with bindDn that is under a naming context but points to non-existant user.
      * 
      * @throws Exception 
      */
-    @Test( expected=LdapAuthenticationException.class )
+    @Test(expected = LdapAuthenticationException.class)
     public void testBadBindDnInContext() throws Exception
     {
         getWiredConnection( getLdapServer(), "cn=bogus,ou=system", "blah" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java Tue Jan 24 16:22:33 2012
@@ -62,8 +62,8 @@ import org.junit.runner.RunWith;
 @CreateDS(allowAnonAccess = true, name = "DelegatedAuthIT-class")
 @CreateLdapServer(
     transports =
-    {
-        @CreateTransport(protocol = "LDAP", port = 10200)
+        {
+            @CreateTransport(protocol = "LDAP", port = 10200)
     })
 public class DelegatedAuthIT extends AbstractLdapTestUnit
 {
@@ -79,27 +79,28 @@ public class DelegatedAuthIT extends Abs
         name = "DelegatedAuthIT-method",
         authenticators =
             {
-            @CreateAuthenticator(
-                type = DelegatingAuthenticator.class,
-                delegateHost = "localhost",
-                delegatePort = 10200) })
+                @CreateAuthenticator(
+                    type = DelegatingAuthenticator.class,
+                    delegateHost = "localhost",
+                    delegatePort = 10200) })
     @CreateLdapServer(
         transports =
-    {
-        @CreateTransport(protocol = "LDAP")
-    })
+            {
+                @CreateTransport(protocol = "LDAP")
+        })
     @Test
     public void testDelegatedAuthentication() throws Exception
     {
         assertTrue( getService().isStarted() );
         assertEquals( "DelegatedAuthIT-method", getService().getInstanceId() );
-        LdapConnection ldapConnection = LdapConnectionFactory.getNetworkConnection( "localhost", getLdapServer().getPort() );
+        LdapConnection ldapConnection = LdapConnectionFactory.getNetworkConnection( "localhost", getLdapServer()
+            .getPort() );
         ldapConnection.bind( "uid=antoine,ou=users,ou=system", "secret" );
-        
+
         assertTrue( ldapConnection.isAuthenticated() );
-        
+
         ldapConnection.unBind();
-        
+
         try
         {
             ldapConnection.bind( "uid=antoine,ou=users,ou=system", "sesame" );
@@ -109,9 +110,9 @@ public class DelegatedAuthIT extends Abs
         {
             assertTrue( true );
         }
-        
+
         ldapConnection.unBind();
-        
+
         try
         {
             ldapConnection.bind( "uid=ivanhoe,ou=users,ou=system", "secret" );
@@ -121,12 +122,12 @@ public class DelegatedAuthIT extends Abs
         {
             assertTrue( true );
         }
-        
+
         ldapConnection.unBind();
         ldapConnection.close();
     }
-    
-    
+
+
     /**
      * Test with bindDn which is not even found under any namingContext of the
      * server.
@@ -138,39 +139,40 @@ public class DelegatedAuthIT extends Abs
         name = "DelegatedAuthIT-MultipleAuthenticators-method",
         authenticators =
             {
-            @CreateAuthenticator(type = AnonymousAuthenticator.class),
-            @CreateAuthenticator(type = SimpleAuthenticator.class),
-            @CreateAuthenticator(
-                type = DelegatingAuthenticator.class,
-                delegateHost = "localhost",
-                delegatePort = 10200),
-            @CreateAuthenticator(type = StrongAuthenticator.class)})
-            @ApplyLdifs(
-                {
-                    // Entry # 1
-                    "dn: uid=emmanuel,ou=users,ou=system",
-                    "objectClass: uidObject",
-                    "objectClass: person",
-                    "objectClass: top",
-                    "uid: emmanuel",
-                    "cn: Emmanuel Lecharny",
-                    "sn: Lecharny",
-                    "userPassword: sesame" })
-                @CreateLdapServer(
-                    transports =
-                {
-                    @CreateTransport(protocol = "LDAP")
-                })
+                @CreateAuthenticator(type = AnonymousAuthenticator.class),
+                @CreateAuthenticator(type = SimpleAuthenticator.class),
+                @CreateAuthenticator(
+                    type = DelegatingAuthenticator.class,
+                    delegateHost = "localhost",
+                    delegatePort = 10200),
+                @CreateAuthenticator(type = StrongAuthenticator.class) })
+    @ApplyLdifs(
+        {
+            // Entry # 1
+            "dn: uid=emmanuel,ou=users,ou=system",
+            "objectClass: uidObject",
+            "objectClass: person",
+            "objectClass: top",
+            "uid: emmanuel",
+            "cn: Emmanuel Lecharny",
+            "sn: Lecharny",
+            "userPassword: sesame" })
+    @CreateLdapServer(
+        transports =
+            {
+                @CreateTransport(protocol = "LDAP")
+        })
     @Test
     public void testMultipleAuthenticators() throws Exception
     {
         assertTrue( getService().isStarted() );
         assertEquals( "DelegatedAuthIT-MultipleAuthenticators-method", getService().getInstanceId() );
-        LdapConnection ldapConnection = LdapConnectionFactory.getNetworkConnection( "localhost", getLdapServer().getPort() );
+        LdapConnection ldapConnection = LdapConnectionFactory.getNetworkConnection( "localhost", getLdapServer()
+            .getPort() );
         ldapConnection.bind( "uid=emmanuel,ou=users,ou=system", "sesame" );
 
         assertTrue( ldapConnection.isAuthenticated() );
-        
+
         ldapConnection.unBind();
 
         try
@@ -182,19 +184,19 @@ public class DelegatedAuthIT extends Abs
         {
             assertTrue( true );
         }
-        
+
         ldapConnection.unBind();
         ldapConnection.bind();
-        
+
         assertTrue( ldapConnection.isAuthenticated() );
-        
+
         ldapConnection.unBind();
         ldapConnection.bind( "uid=antoine,ou=users,ou=system", "secret" );
-        
+
         assertTrue( ldapConnection.isAuthenticated() );
-        
+
         ldapConnection.unBind();
-        
+
         try
         {
             ldapConnection.bind( "uid=antoine,ou=users,ou=system", "sesame" );
@@ -203,9 +205,9 @@ public class DelegatedAuthIT extends Abs
         {
             assertTrue( true );
         }
-        
+
         ldapConnection.unBind();
-        
+
         try
         {
             try
@@ -216,7 +218,7 @@ public class DelegatedAuthIT extends Abs
             {
                 assertTrue( true );
             }
-        
+
             ldapConnection.unBind();
         }
         catch ( Exception exc )

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java Tue Jan 24 16:22:33 2012
@@ -81,8 +81,8 @@ import org.junit.runner.RunWith;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class )
-@CreateDS( allowAnonAccess=true, name="MiscBindIT-class",
+@RunWith(FrameworkRunner.class)
+@CreateDS(allowAnonAccess = true, name = "MiscBindIT-class",
     partitions =
         {
             @CreatePartition(
@@ -90,21 +90,21 @@ import org.junit.runner.RunWith;
                 suffix = "dc=aPache,dc=org",
                 contextEntry = @ContextEntry(
                     entryLdif =
-                        "dn: dc=aPache,dc=org\n" +
+                    "dn: dc=aPache,dc=org\n" +
                         "dc: aPache\n" +
                         "objectClass: top\n" +
-                        "objectClass: domain\n\n" ),
+                        "objectClass: domain\n\n"),
                 indexes =
-                {
-                    @CreateIndex( attribute = "objectClass" ),
-                    @CreateIndex( attribute = "dc" ),
-                    @CreateIndex( attribute = "ou" )
-                } )
-        })
-@CreateLdapServer (
+                    {
+                        @CreateIndex(attribute = "objectClass"),
+                        @CreateIndex(attribute = "dc"),
+                        @CreateIndex(attribute = "ou")
+                })
+    })
+@CreateLdapServer(
     transports =
-    {
-        @CreateTransport( protocol = "LDAP" )
+        {
+            @CreateTransport(protocol = "LDAP")
     })
 public class MiscBindIT extends AbstractLdapTestUnit
 {
@@ -113,14 +113,15 @@ public class MiscBindIT extends Abstract
 
     private boolean oldAnnonymousAccess;
 
+
     @Before
     public void init() throws Exception
     {
         getLdapServer().addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
         // Setup SASL Mechanisms
-        
-        Map<String, MechanismHandler> mechanismHandlerMap = new HashMap<String,MechanismHandler>();
+
+        Map<String, MechanismHandler> mechanismHandlerMap = new HashMap<String, MechanismHandler>();
         mechanismHandlerMap.put( SupportedSaslMechanisms.PLAIN, new SimpleMechanismHandler() );
 
         CramMd5MechanismHandler cramMd5MechanismHandler = new CramMd5MechanismHandler();
@@ -139,15 +140,15 @@ public class MiscBindIT extends Abstract
         getLdapServer().setSaslMechanismHandlers( mechanismHandlerMap );
         oldAnnonymousAccess = getLdapServer().getDirectoryService().isAllowAnonymousAccess();
     }
-    
-    
+
+
     @After
     public void revertAnonnymous()
     {
         getLdapServer().getDirectoryService().setAllowAnonymousAccess( oldAnnonymousAccess );
     }
 
-    
+
     /**
      * Test to make sure anonymous binds are disabled when going through
      * the wire protocol.
@@ -158,7 +159,7 @@ public class MiscBindIT extends Abstract
     public void testDisableAnonymousBinds() throws Exception
     {
         getLdapServer().getDirectoryService().setAllowAnonymousAccess( false );
-        
+
         // Use the SUN JNDI provider to hit server port and bind as anonymous
         final Hashtable<String, Object> env = new Hashtable<String, Object>();
 
@@ -180,7 +181,8 @@ public class MiscBindIT extends Abstract
         {
             // Use the netscape API as JNDI cannot be used to do a search without
             // first binding.
-            LDAPUrl url = new LDAPUrl( "localhost", getLdapServer().getPort(), "ou=system", new String[]{"vendorName"}, 0, "(ObjectClass=*)" );
+            LDAPUrl url = new LDAPUrl( "localhost", getLdapServer().getPort(), "ou=system", new String[]
+                { "vendorName" }, 0, "(ObjectClass=*)" );
             LDAPConnection.search( url );
 
             fail();
@@ -214,14 +216,14 @@ public class MiscBindIT extends Abstract
         SearchControls cons = new SearchControls();
         cons.setSearchScope( SearchControls.OBJECT_SCOPE );
         NamingEnumeration<SearchResult> list = ctx.search( "", "(objectClass=*)", cons );
-        
+
         SearchResult result = null;
-        
+
         if ( list.hasMore() )
         {
             result = list.next();
         }
-        
+
         assertFalse( list.hasMore() );
         list.close();
 
@@ -253,12 +255,12 @@ public class MiscBindIT extends Abstract
         cons.setSearchScope( SearchControls.OBJECT_SCOPE );
         NamingEnumeration<SearchResult> list = ctx.search( "dc=apache,dc=org", "(objectClass=*)", cons );
         SearchResult result = null;
-        
+
         if ( list.hasMore() )
         {
             result = list.next();
         }
-        
+
         assertFalse( list.hasMore() );
         list.close();
 
@@ -297,7 +299,7 @@ public class MiscBindIT extends Abstract
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
         controls.setReturningAttributes( new String[]
-                {"+"} );
+            { "+" } );
         NamingEnumeration<SearchResult> list = ctx.search( "ou=blah,ou=system", "(objectClass=*)", controls );
         SearchResult result = list.next();
         list.close();
@@ -356,9 +358,9 @@ public class MiscBindIT extends Abstract
     {
         Control unsupported = new OpaqueControl( "1.1.1.1" );
         unsupported.setCritical( true );
-        
+
         getLdapServer().getDirectoryService().setAllowAnonymousAccess( true );
-        
+
         Hashtable<String, Object> env = new Hashtable<String, Object>();
 
         env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() + "/ou=system" );
@@ -379,7 +381,8 @@ public class MiscBindIT extends Abstract
         user.put( "sn", "Bush" );
         user.put( "userPassword", "Aerial" );
         ctx.setRequestControls( JndiUtils.toJndiControls( getLdapServer().getDirectoryService().getLdapCodecService(),
-            new Control[] {unsupported} ) );
+            new Control[]
+                { unsupported } ) );
 
         try
         {
@@ -392,12 +395,13 @@ public class MiscBindIT extends Abstract
 
         unsupported.setCritical( false );
         ctx.setRequestControls( JndiUtils.toJndiControls( getLdapServer().getDirectoryService().getLdapCodecService(),
-            new Control[]{unsupported} ) );
-        
+            new Control[]
+                { unsupported } ) );
+
         DirContext kate = ctx.createSubcontext( "cn=Kate Bush", user );
         assertNotNull( kate );
         assertTrue( ArrayUtils.isEquals( Asn1StringUtils.getBytesUtf8( "Aerial" ), kate.getAttributes( "" ).get(
-                "userPassword" ).get() ) );
+            "userPassword" ).get() ) );
 
         ctx.destroySubcontext( "cn=Kate Bush" );
     }

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java?rev=1235328&r1=1235327&r2=1235328&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java Tue Jan 24 16:22:33 2012
@@ -163,9 +163,9 @@ import org.slf4j.LoggerFactory;
     { StoredProcedureExtendedOperationHandler.class }, ntlmProvider = BogusNtlmProvider.class)
 @CreateKdcServer(
     transports =
-    {
-        @CreateTransport(protocol = "UDP", port = 6088),
-        @CreateTransport(protocol = "TCP", port = 6088)
+        {
+            @CreateTransport(protocol = "UDP", port = 6088),
+            @CreateTransport(protocol = "TCP", port = 6088)
     })
 public class SaslBindIT extends AbstractLdapTestUnit
 {
@@ -233,7 +233,8 @@ public class SaslBindIT extends Abstract
      * Tests to make sure PLAIN-binds works
      */
     @Test
-    @Ignore // The SASL Plain mechanism is ot supported
+    @Ignore
+    // The SASL Plain mechanism is ot supported
     public void testSaslBindPLAIN() throws Exception
     {
         Dn userDn = new Dn( "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -345,7 +346,8 @@ public class SaslBindIT extends Abstract
 
         connection.close();
     }
-    
+
+
     /**
      * Tests to make sure DIGEST-MD5 binds below the RootDSE work with
      * SASL Quality of Protection set to 'auth'.
@@ -369,7 +371,8 @@ public class SaslBindIT extends Abstract
 
         connection.close();
     }
-    
+
+
     /**
      * Tests to make sure DIGEST-MD5 binds below the RootDSE work with
      * SASL Quality of Protection set to 'auth-int'.
@@ -394,7 +397,8 @@ public class SaslBindIT extends Abstract
 
         connection.close();
     }
-    
+
+
     /**
      * Tests to make sure DIGEST-MD5 binds below the RootDSE work with
      * SASL Quality of Protection set to 'auth-conf'.
@@ -753,7 +757,7 @@ public class SaslBindIT extends Abstract
             // Retrieve the response back from server to my last request.
             LdapMessageContainer<MessageDecorator<? extends Message>> container = new LdapMessageContainer(
                 ldapServer.getDirectoryService().getLdapCodecService() );
-            return ( BindResponse ) decoder.decode( _input_ , container );
+            return ( BindResponse ) decoder.decode( _input_, container );
         }
     }
 



Mime
View raw message