directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1071728 [5/7] - in /directory: apacheds/branches/m1/core-annotations/src/main/java/org/apache/directory/server/core/factory/ apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/m1/core-api/src/ma...
Date Thu, 17 Feb 2011 17:50:56 GMT
Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java Thu Feb 17 17:50:50 2011
@@ -108,7 +108,7 @@ public class MetaSchemaHandlerIT extends
     @Before
     public void checkSambaSchema() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
 
         // check that there is a samba schema installed and that is is disabled
         Attributes attributes = schemaRoot.getAttributes( "cn=samba" );
@@ -119,13 +119,13 @@ public class MetaSchemaHandlerIT extends
         assertTrue( attributes.get( SchemaConstants.OU_AT ).contains( "attributetypes" ) );
         
         // Disable the NIS schema
-        IntegrationUtils.disableSchema( service, "nis" );
+        IntegrationUtils.disableSchema( getService(), "nis" );
     }
 
     
     private void createDisabledBrokenSchema() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
 
         // Create the schema
         Attributes dummySchema = LdifUtils.createAttributes( 
@@ -140,7 +140,7 @@ public class MetaSchemaHandlerIT extends
     
     private void createEnabledValidSchema( String schemaName ) throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
 
         // Create the schema
         Attributes dummySchema = LdifUtils.createAttributes( 
@@ -165,24 +165,24 @@ public class MetaSchemaHandlerIT extends
     public void testEnableExistingSchema() throws Exception
     {
         // Chck that the nis schema is loaded
-        assertTrue( IntegrationUtils.isLoaded( service, "nis" ) );
+        assertTrue( IntegrationUtils.isLoaded( getService(), "nis" ) );
 
         // check that the nis schema is not enabled
-        assertTrue( IntegrationUtils.isDisabled( service, "nis" ) );
+        assertTrue( IntegrationUtils.isDisabled( getService(), "nis" ) );
         
         // double check and make sure an attribute from that schema is 
         // not in the AttributeTypeRegistry
-        assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
+        assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
         
         // now enable the test schema
-        IntegrationUtils.enableSchema( service, "nis" );
+        IntegrationUtils.enableSchema( getService(), "nis" );
         
         // now test that the schema is loaded 
-        assertTrue( IntegrationUtils.isEnabled( service, "nis" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "nis" ) );
         
         // double check and make sure the test attribute from the 
         // test schema is now loaded and present within the attr registry
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
     }
 
 
@@ -195,12 +195,12 @@ public class MetaSchemaHandlerIT extends
     public void testEnableNotExistingSchema() throws Exception
     {
         // check that the 'wrong' schema is not loaded
-        assertFalse( IntegrationUtils.isLoaded( service, "wrong" ) );
+        assertFalse( IntegrationUtils.isLoaded( getService(), "wrong" ) );
         
         // now enable the 'wrong' schema
         try
         {
-            IntegrationUtils.enableSchema( service, "wrong" );
+            IntegrationUtils.enableSchema( getService(), "wrong" );
             fail();
         }
         catch ( NameNotFoundException lnnfe )
@@ -210,7 +210,7 @@ public class MetaSchemaHandlerIT extends
         }
         
         // Test again that the schema is not loaded 
-        assertFalse( IntegrationUtils.isLoaded( service, "wrong" ) );
+        assertFalse( IntegrationUtils.isLoaded( getService(), "wrong" ) );
     }
 
     
@@ -224,27 +224,27 @@ public class MetaSchemaHandlerIT extends
     public void testEnableSchemaAlreadyEnabled() throws Exception
     {
         // check that the nis schema is loaded
-        assertTrue( IntegrationUtils.isLoaded(  service, "nis" ) );
+        assertTrue( IntegrationUtils.isLoaded(  getService(), "nis" ) );
         
         // Ceck that it's not enabled
-        assertTrue( IntegrationUtils.isDisabled( service, "nis" ) );
+        assertTrue( IntegrationUtils.isDisabled( getService(), "nis" ) );
         
         // double check and make sure an attribute from that schema is 
         // not in the AttributeTypeRegistry
-        assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
+        assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
         
         // now enable the test schema
-        IntegrationUtils.enableSchema( service, "nis" );
+        IntegrationUtils.enableSchema( getService(), "nis" );
         
         // and enable it again (it should not do anything)
-        IntegrationUtils.enableSchema( service, "nis" );
+        IntegrationUtils.enableSchema( getService(), "nis" );
         
         // now test that the schema is loaded 
-        assertTrue( IntegrationUtils.isEnabled( service, "nis" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "nis" ) );
         
         // double check and make sure the test attribute from the 
         // test schema is now loaded and present within the attr registry
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
     }
 
     
@@ -275,24 +275,24 @@ public class MetaSchemaHandlerIT extends
     public void testDisableExistingSchema() throws Exception
     {
         // Check that the krb5kdc schema is loaded
-        assertTrue( IntegrationUtils.isLoaded( service, "krb5kdc" ) );
+        assertTrue( IntegrationUtils.isLoaded( getService(), "krb5kdc" ) );
 
         // check that the krb5kdc schema is enabled
-        assertTrue( IntegrationUtils.isEnabled( service, "krb5kdc" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "krb5kdc" ) );
         
         // double check and make sure an attribute from that schema is 
         // in the AttributeTypeRegistry
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( KRB5_PRINCIPAL_NAME_ATTR ) );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( KRB5_PRINCIPAL_NAME_ATTR ) );
         
         // now disable the krb5kdc schema
-        IntegrationUtils.disableSchema( service, "krb5kdc" );
+        IntegrationUtils.disableSchema( getService(), "krb5kdc" );
         
         // now test that the schema is not enabled 
-        assertTrue( IntegrationUtils.isDisabled( service, "krb5kdc" ) );
+        assertTrue( IntegrationUtils.isDisabled( getService(), "krb5kdc" ) );
         
         // double check and make sure the test attribute from the 
         // test schema is now loaded and present within the attr registry
-        assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( KRB5_PRINCIPAL_NAME_ATTR ) );
+        assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( KRB5_PRINCIPAL_NAME_ATTR ) );
     }
 
 
@@ -305,12 +305,12 @@ public class MetaSchemaHandlerIT extends
     public void testDisableNotExistingSchema() throws Exception
     {
         // check that the 'wrong' schema is not loaded
-        assertFalse( IntegrationUtils.isLoaded( service, "wrong" ) );
+        assertFalse( IntegrationUtils.isLoaded( getService(), "wrong" ) );
         
         // now disable the 'wrong' schema
         try
         {
-            IntegrationUtils.disableSchema( service, "wrong" );
+            IntegrationUtils.disableSchema( getService(), "wrong" );
             fail();
         }
         catch ( NameNotFoundException lnnfe )
@@ -320,7 +320,7 @@ public class MetaSchemaHandlerIT extends
         }
         
         // Test again that the schema is not loaded 
-        assertFalse( IntegrationUtils.isLoaded( service, "wrong" ) );
+        assertFalse( IntegrationUtils.isLoaded( getService(), "wrong" ) );
     }
 
     
@@ -334,24 +334,24 @@ public class MetaSchemaHandlerIT extends
     public void testDisableSchemaAlreadyDisabled() throws Exception
     {
         // check that the nis schema is loaded
-        assertTrue( IntegrationUtils.isLoaded(  service, "nis" ) );
+        assertTrue( IntegrationUtils.isLoaded(  getService(), "nis" ) );
         
         // Check that it's not enabled
-        assertTrue( IntegrationUtils.isDisabled( service, "nis" ) );
+        assertTrue( IntegrationUtils.isDisabled( getService(), "nis" ) );
         
         // double check and make sure an attribute from that schema is 
         // not in the AttributeTypeRegistry
-        assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
+        assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
         
         // now disable the test schema again
-        IntegrationUtils.disableSchema( service, "nis" );
+        IntegrationUtils.disableSchema( getService(), "nis" );
 
         // now test that the schema is not loaded 
-        assertTrue( IntegrationUtils.isDisabled( service, "nis" ) );
+        assertTrue( IntegrationUtils.isDisabled( getService(), "nis" ) );
         
         // double check and make sure the test attribute from the 
         // test schema is not loaded and present within the attr registry
-        assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
+        assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
     }
 
     
@@ -365,24 +365,24 @@ public class MetaSchemaHandlerIT extends
     public void testDisableSchemaBreakingRegistries() throws Exception
     {
         // check that the nis schema is loaded
-        assertTrue( IntegrationUtils.isLoaded(  service, "system" ) );
+        assertTrue( IntegrationUtils.isLoaded(  getService(), "system" ) );
         
         // Check that it's enabled
-        assertTrue( IntegrationUtils.isEnabled( service, "system" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "system" ) );
         
         // double check and make sure an attribute from that schema is 
         // in the AttributeTypeRegistry
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( "cn" ) );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( "cn" ) );
         
         // now disable the system schema : it should break the registries, thus being rejected
-        IntegrationUtils.disableSchema( service, "system" );
+        IntegrationUtils.disableSchema( getService(), "system" );
 
         // now test that the schema is not loaded 
-        assertTrue( IntegrationUtils.isEnabled( service, "system" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "system" ) );
         
         // double check and make sure the test attribute from the 
         // test schema is loaded and present within the attr registry
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( "cn" ) );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( "cn" ) );
     }
 
     // -----------------------------------------------------------------------
@@ -398,11 +398,11 @@ public class MetaSchemaHandlerIT extends
 
         assertFalse( isOnDisk( dn ) );
 
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         
         createEnabledValidSchema( "dummy" );
         
-        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
         
         assertTrue( isOnDisk( dn ) );
@@ -419,7 +419,7 @@ public class MetaSchemaHandlerIT extends
 
         assertFalse( isOnDisk( dn ) );
 
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         Attributes dummySchema = LdifUtils.createAttributes(
                 "objectClass: top",
                 "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
@@ -430,7 +430,7 @@ public class MetaSchemaHandlerIT extends
         
         schemaRoot.createSubcontext( "cn=dummy", dummySchema );
         
-        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
         
         assertTrue( isOnDisk( dn ) );
@@ -447,7 +447,7 @@ public class MetaSchemaHandlerIT extends
 
         assertFalse( isOnDisk( dn ) );
 
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         Attributes dummySchema = LdifUtils.createAttributes( 
             "objectClass: top",
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
@@ -466,7 +466,7 @@ public class MetaSchemaHandlerIT extends
             // expected        
         }
         
-        assertFalse( IntegrationUtils.isLoaded( service, "dummy" ) );
+        assertFalse( IntegrationUtils.isLoaded( getService(), "dummy" ) );
         assertFalse( isOnDisk( dn ) );
     }
     
@@ -481,7 +481,7 @@ public class MetaSchemaHandlerIT extends
 
         assertFalse( isOnDisk( dn ) );
 
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         Attributes dummySchema = LdifUtils.createAttributes( 
             "objectClass: top",
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
@@ -500,7 +500,7 @@ public class MetaSchemaHandlerIT extends
             // expected       
         }
         
-        assertFalse( IntegrationUtils.isLoaded( service, "dummy" ) );
+        assertFalse( IntegrationUtils.isLoaded( getService(), "dummy" ) );
         assertFalse( isOnDisk( dn ) );
     }
 
@@ -515,18 +515,18 @@ public class MetaSchemaHandlerIT extends
     public void testDeleteEnabledValidSchema() throws Exception
     {
         Dn dn = getSchemaContainer( "dummy" );
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         
         // Create a schema we will delete
         createEnabledValidSchema( "dummy" );
         assertTrue( isOnDisk( dn ) );
-        assertTrue( IntegrationUtils.isLoaded( service, "dummy" ) );
+        assertTrue( IntegrationUtils.isLoaded( getService(), "dummy" ) );
 
         // Delete the schema
         schemaRoot.destroySubcontext( "cn=dummy" );
 
         assertFalse( isOnDisk( dn ) );
-        assertFalse( IntegrationUtils.isLoaded( service, "dummy" ) );
+        assertFalse( IntegrationUtils.isLoaded( getService(), "dummy" ) );
     }
 
     
@@ -543,7 +543,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testAddDisabledSchemaNoDeps() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         Attributes dummySchema = LdifUtils.createAttributes( 
             "objectClass: top",
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
@@ -552,7 +552,7 @@ public class MetaSchemaHandlerIT extends
         
         schemaRoot.createSubcontext( "cn=dummy", dummySchema );
         
-        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
     }
     
@@ -567,7 +567,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testAddDisabledSchemaWithDeps() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         Attributes dummySchema = LdifUtils.createAttributes( 
             "objectClass: top",
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
@@ -578,7 +578,7 @@ public class MetaSchemaHandlerIT extends
         
         schemaRoot.createSubcontext( "cn=dummy", dummySchema );
         
-        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
     }
     
@@ -593,7 +593,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testRejectDisabledSchemaAddWithMissingDeps() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         Attributes dummySchema = LdifUtils.createAttributes( 
             "objectClass: top",
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
@@ -611,7 +611,7 @@ public class MetaSchemaHandlerIT extends
             // expected        
         }
         
-        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
 
         //noinspection EmptyCatchBlock
         try
@@ -634,7 +634,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testAddEnabledSchemaNoDeps() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         Attributes dummySchema = LdifUtils.createAttributes( 
             "objectClass: top",
             "objectClass: metaSchema",
@@ -643,7 +643,7 @@ public class MetaSchemaHandlerIT extends
 
         schemaRoot.createSubcontext( "cn=dummy", dummySchema );
         
-        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
     }
     
@@ -658,7 +658,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testRejectEnabledSchemaAddWithDisabledDeps() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         Attributes dummySchema = LdifUtils.createAttributes( 
             "objectClass: top",
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
@@ -675,7 +675,7 @@ public class MetaSchemaHandlerIT extends
             // expected        
         }
         
-        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
 
         //noinspection EmptyCatchBlock
         try
@@ -703,15 +703,15 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testDeleteSchemaNoDependents() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
 
         // add the dummy schema enabled 
         testAddEnabledSchemaNoDeps();
-        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         
         // delete it now
         schemaRoot.destroySubcontext( "cn=dummy" );
-        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
     }
     
     
@@ -724,11 +724,11 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testRejectSchemaDeleteWithDependents() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
 
         // add the dummy schema enabled
         testAddEnabledSchemaNoDeps();
-        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         
         // make the nis schema depend on the dummy schema
         ModificationItem[] mods = new ModificationItem[1];
@@ -747,7 +747,7 @@ public class MetaSchemaHandlerIT extends
             // expected        
         }
 
-        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
     }
     
     
@@ -761,7 +761,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testRejectEnabledSchemaAddWithMisingDeps() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
 
         Attributes dummySchema = LdifUtils.createAttributes( 
             "objectClass: top",
@@ -779,7 +779,7 @@ public class MetaSchemaHandlerIT extends
             // expected        
         }
         
-        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
 
         //noinspection EmptyCatchBlock
         try
@@ -804,7 +804,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testDisableSchemaWithEnabledDependents() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
 
         // let's enable the test schema and add the dummy schema
         // as enabled by default and dependends on the test schema
@@ -822,12 +822,12 @@ public class MetaSchemaHandlerIT extends
         schemaRoot.createSubcontext( "cn=dummy", dummySchema );
         
         // check that the nis schema is loaded and the dummy schema is loaded
-        assertTrue( IntegrationUtils.isEnabled( service, "nis" ) );
-        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "nis" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         
         // double check and make sure an attribute from that schema is 
         // in the AttributeTypeRegistry
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
         
         // now try to disable the test schema which should fail 
         // since it's dependent, the dummy schema, is enabled
@@ -846,12 +846,12 @@ public class MetaSchemaHandlerIT extends
         }
         
         // now test that both schema are still loaded 
-        assertTrue( IntegrationUtils.isEnabled( service, "nis" ) );
-        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "nis" ) );
+        assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         
         // double check and make sure the test attribute from the test  
         // schema is still loaded and present within the attr registry
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
     }
     
     
@@ -869,7 +869,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testSchemaRenameDisabledSchema() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         schemaRoot.rename( "cn=samba", "cn=foo" );
         assertNotNull( schemaRoot.lookup( "cn=foo" ) );
 
@@ -904,7 +904,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testRejectSchemaRenameWithDeps() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         try
         {
             schemaRoot.rename( "cn=nis", "cn=foo" );
@@ -940,16 +940,16 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testSchemaRenameEnabledSchema() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
 
-        IntegrationUtils.enableSchema( service, "samba" );
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( "sambaNTPassword" ) );
-        assertEquals( "samba", service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( "sambaNTPassword" ) );
+        IntegrationUtils.enableSchema( getService(), "samba" );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( "sambaNTPassword" ) );
+        assertEquals( "samba", getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( "sambaNTPassword" ) );
         
         schemaRoot.rename( "cn=samba", "cn=foo" );
         assertNotNull( schemaRoot.lookup( "cn=foo" ) );
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( "sambaNTPassword" ) );
-        assertEquals( "foo", service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( "sambaNTPassword" ) );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( "sambaNTPassword" ) );
+        assertEquals( "foo", getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( "sambaNTPassword" ) );
 
         //noinspection EmptyCatchBlock
         try
@@ -976,7 +976,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testRejectAddBogusDependency() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
 
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-dependencies", "bogus" );
@@ -1006,8 +1006,8 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testRejectAddOfDisabledDependencyToEnabledSchema() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
-        IntegrationUtils.enableSchema( service, "nis" );
+        LdapContext schemaRoot = getSchemaContext( getService() );
+        IntegrationUtils.enableSchema( getService(), "nis" );
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-dependencies", "mozilla" );
         mods[0] = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
@@ -1034,7 +1034,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testAddOfDisabledDependencyToDisabledSchema() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-dependencies", "mozilla" );
         mods[0] = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
@@ -1055,7 +1055,7 @@ public class MetaSchemaHandlerIT extends
     @Ignore
     public void testAddOfEnabledDependencyToDisabledSchema() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-dependencies", "java" );
         mods[0] = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java Thu Feb 17 17:50:50 2011
@@ -74,7 +74,7 @@ public class MetaSyntaxCheckerHandlerIT 
     @Before
     public void setup()
     {
-        schemaManager = service.getSchemaManager();
+        schemaManager = getService().getSchemaManager();
     }
 
 
@@ -90,7 +90,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         Dn dn = getSyntaxCheckerContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         assertEquals( schemaManager.getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
@@ -110,7 +110,7 @@ public class MetaSyntaxCheckerHandlerIT 
         // nis is by default inactive
         Dn dn = getSyntaxCheckerContainer( "nis" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertFalse( "adding new syntaxChecker to disabled schema should not register it into the registries",
             schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
@@ -131,7 +131,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail( "Should not be there" );
         }
         catch ( NameNotFoundException nnfe )
@@ -163,7 +163,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         Dn dn = getSyntaxCheckerContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         assertEquals( schemaManager.getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
@@ -191,7 +191,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         Dn dn = getSyntaxCheckerContainer( "nis" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertFalse( schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
@@ -209,7 +209,7 @@ public class MetaSyntaxCheckerHandlerIT 
             .getSyntaxCheckerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "syntaxChecker should be removed from the registry after being deleted", schemaManager
             .getSyntaxCheckerRegistry().contains( OID ) );
@@ -238,7 +238,7 @@ public class MetaSyntaxCheckerHandlerIT 
             .getSyntaxCheckerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "syntaxChecker should be removed from the registry after being deleted", schemaManager
             .getSyntaxCheckerRegistry().contains( OID ) );
@@ -266,7 +266,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         Dn newdn = getSyntaxCheckerContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old syntaxChecker OID should be removed from the registry after being renamed", schemaManager
             .getSyntaxCheckerRegistry().contains( OID ) );
@@ -299,7 +299,7 @@ public class MetaSyntaxCheckerHandlerIT 
         Dn newdn = getSyntaxCheckerContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName(dn), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName(dn), JndiUtils.toName( newdn ) );
 
         assertTrue( "syntaxChecker OID should still be present", schemaManager.getSyntaxCheckerRegistry()
             .contains( OID ) );
@@ -324,7 +324,7 @@ public class MetaSyntaxCheckerHandlerIT 
         Dn newdn = getSyntaxCheckerContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old syntaxChecker OID should NOT be present", schemaManager.getSyntaxCheckerRegistry().contains(
             OID ) );
@@ -352,7 +352,7 @@ public class MetaSyntaxCheckerHandlerIT 
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-fqcn", BogusSyntaxChecker.class.getName() );
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), mods );
 
         assertTrue( "syntaxChecker OID should still be present", schemaManager.getSyntaxCheckerRegistry()
             .contains( OID ) );
@@ -376,7 +376,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-fqcn", BogusSyntaxChecker.class.getName() );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
 
         assertTrue( "syntaxChecker OID should still be present", schemaManager.getSyntaxCheckerRegistry()
             .contains( OID ) );
@@ -401,7 +401,7 @@ public class MetaSyntaxCheckerHandlerIT 
         // Create a new SyntaxChecker
         testAddSyntaxCheckerToEnabledSchema();
         assertTrue( isOnDisk( scDn ) );
-        assertTrue( service.getSchemaManager().getSyntaxCheckerRegistry().contains( OID ) );
+        assertTrue( getService().getSchemaManager().getSyntaxCheckerRegistry().contains( OID ) );
 
         // Create a Syntax using this comparator
         Attributes attrs = LdifUtils.createAttributes( "objectClass: top", "objectClass: metaTop",
@@ -412,18 +412,18 @@ public class MetaSyntaxCheckerHandlerIT 
 
         // Pre-checks
         assertFalse( isOnDisk( sDn ) );
-        assertFalse( service.getSchemaManager().getLdapSyntaxRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getLdapSyntaxRegistry().contains( OID ) );
 
         // Syntax Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( sDn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( sDn ), attrs );
 
         // Post-checks
         assertTrue( isOnDisk( sDn ) );
-        assertTrue( service.getSchemaManager().getLdapSyntaxRegistry().contains( OID ) );
+        assertTrue( getService().getSchemaManager().getLdapSyntaxRegistry().contains( OID ) );
 
         try
         {
-            getSchemaContext( service ).destroySubcontext( JndiUtils.toName( scDn ) );
+            getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( scDn ) );
             fail( "should not be able to delete a syntaxChecker in use" );
         }
         catch ( OperationNotSupportedException e )
@@ -450,7 +450,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a syntaxChecker in use" );
         }
         catch ( OperationNotSupportedException e )
@@ -479,7 +479,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a syntaxChecker in use" );
         }
         catch ( OperationNotSupportedException e )
@@ -507,7 +507,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to rename a syntaxChecker in use" );
         }
         catch ( OperationNotSupportedException e )
@@ -539,7 +539,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
             fail( "should not be able to move a syntaxChecker up to ou=schema" );
         }
         catch ( InvalidNameException e )
@@ -565,7 +565,7 @@ public class MetaSyntaxCheckerHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a syntaxChecker into comparators container" );
         }
         catch ( InvalidNameException e )
@@ -590,7 +590,7 @@ public class MetaSyntaxCheckerHandlerIT 
         Dn newdn = getSyntaxCheckerContainer( "nis" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "syntaxChecker OID should no longer be present", schemaManager.getSyntaxCheckerRegistry()
             .contains( OID ) );
@@ -613,7 +613,7 @@ public class MetaSyntaxCheckerHandlerIT 
         Dn newdn = getSyntaxCheckerContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertTrue( "syntaxChecker OID should be present when moved to enabled schema", schemaManager
             .getSyntaxCheckerRegistry().contains( OID ) );

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java Thu Feb 17 17:50:50 2011
@@ -87,7 +87,7 @@ public class MetaSyntaxHandlerIT extends
     @Before
     public void setup()
     {
-        schemaManager = service.getSchemaManager();
+        schemaManager = getService().getSchemaManager();
     }
 
 
@@ -108,7 +108,7 @@ public class MetaSyntaxHandlerIT extends
         dn = dn.add( "m-oid" + "=" + OID );
 
         createDummySyntaxChecker( OID, "apachemeta" );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( schemaManager.getLdapSyntaxRegistry().contains( OID ) );
         assertEquals( schemaManager.getLdapSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
@@ -130,7 +130,7 @@ public class MetaSyntaxHandlerIT extends
         Dn dn = getSyntaxContainer( "nis" );
         dn = dn.add( "m-oid" + "=" + OID );
         createDummySyntaxChecker( OID, "nis" );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertFalse( "adding new syntax to disabled schema should not register it into the registries",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -155,7 +155,7 @@ public class MetaSyntaxHandlerIT extends
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail( "Should not be there" );
         }
         catch( NameNotFoundException nnfe )
@@ -180,7 +180,7 @@ public class MetaSyntaxHandlerIT extends
         assertTrue( "syntax should be removed from the registry after being deleted",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "syntax should be removed from the registry after being deleted",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -209,7 +209,7 @@ public class MetaSyntaxHandlerIT extends
         assertFalse( "syntax should be removed from the registry after being deleted",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "syntax should be removed from the registry after being deleted",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -237,7 +237,7 @@ public class MetaSyntaxHandlerIT extends
 
         Dn newdn = getSyntaxContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old syntax OID should be removed from the registry after being renamed",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -268,7 +268,7 @@ public class MetaSyntaxHandlerIT extends
         Dn newdn = getSyntaxContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertTrue( "syntax OID should still be present",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -290,7 +290,7 @@ public class MetaSyntaxHandlerIT extends
         Dn newdn = getSyntaxContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old syntax OID should NOT be present",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -318,7 +318,7 @@ public class MetaSyntaxHandlerIT extends
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-description", DESCRIPTION1 );
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), mods );
 
         assertTrue( "syntax OID should still be present",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -345,7 +345,7 @@ public class MetaSyntaxHandlerIT extends
 
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-description", DESCRIPTION1 );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
 
         assertTrue( "syntax OID should still be present",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -373,7 +373,7 @@ public class MetaSyntaxHandlerIT extends
 
         try
         {
-            getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+            getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
             fail( "should not be able to delete a syntax in use" );
         }
         catch( OperationNotSupportedException e )
@@ -400,7 +400,7 @@ public class MetaSyntaxHandlerIT extends
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a syntax in use" );
         }
         catch( LdapUnwillingToPerformException e )
@@ -428,7 +428,7 @@ public class MetaSyntaxHandlerIT extends
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a syntax in use" );
         }
         catch( LdapUnwillingToPerformException e )
@@ -453,7 +453,7 @@ public class MetaSyntaxHandlerIT extends
 
         Dn dn = getMatchingRuleContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + MR_OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( schemaManager.getMatchingRuleRegistry().contains( MR_OID ) );
         assertEquals( schemaManager.getMatchingRuleRegistry().getSchemaName( MR_OID ), "apachemeta" );
@@ -474,7 +474,7 @@ public class MetaSyntaxHandlerIT extends
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to rename a syntax in use" );
         }
         catch( LdapUnwillingToPerformException e )
@@ -506,7 +506,7 @@ public class MetaSyntaxHandlerIT extends
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
             fail( "should not be able to move a syntax up to ou=schema" );
         }
         catch( LdapInvalidDnException e )
@@ -533,7 +533,7 @@ public class MetaSyntaxHandlerIT extends
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a syntax into comparators container" );
         }
         catch( LdapInvalidDnException e )
@@ -559,7 +559,7 @@ public class MetaSyntaxHandlerIT extends
         Dn newdn = getSyntaxContainer( "nis" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "syntax OID should no longer be present",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -582,7 +582,7 @@ public class MetaSyntaxHandlerIT extends
         Dn newdn = getSyntaxContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName(newdn) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName(newdn) );
 
         assertTrue( "syntax OID should be present when moved to enabled schema",
             schemaManager.getLdapSyntaxRegistry().contains( OID ) );
@@ -603,7 +603,7 @@ public class MetaSyntaxHandlerIT extends
 
     private void modify( int op, List<String> descriptions, String opAttr ) throws Exception
     {
-        Dn dn = new Dn( service.getSchemaManager(), getSubschemaSubentryDN() );
+        Dn dn = new Dn( getService().getSchemaManager(), getSubschemaSubentryDN() );
         Attribute attr = new BasicAttribute( opAttr );
 
         for ( String description : descriptions )
@@ -614,7 +614,7 @@ public class MetaSyntaxHandlerIT extends
         Attributes mods = new BasicAttributes( true );
         mods.put( attr );
 
-        getRootContext( service ).modifyAttributes( JndiUtils.toName( dn ), op, mods );
+        getRootContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), op, mods );
     }
 
 
@@ -630,7 +630,7 @@ public class MetaSyntaxHandlerIT extends
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
         controls.setReturningAttributes( new String[]{ SUBSCHEMA_SUBENTRY } );
 
-        NamingEnumeration<SearchResult> results = getRootContext( service ).search(
+        NamingEnumeration<SearchResult> results = getRootContext( getService() ).search(
                 "", "(objectClass=*)", controls );
         SearchResult result = results.next();
         results.close();

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java Thu Feb 17 17:50:50 2011
@@ -108,7 +108,7 @@ public class ObjectClassCreateIT extends
         Dn dn = new Dn( "ou=attributeTypes,cn=apachemeta" );
         dn = dn.add( MetaSchemaConstants.M_OID_AT + "=2.16.840.1.113730.3.2.22.249" );
 
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attributes );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attributes );
 
         //--------------------------------------------------------------------
         // The extendPerson OC
@@ -146,7 +146,7 @@ public class ObjectClassCreateIT extends
         dn = new Dn( "ou=objectClasses,cn=apachemeta" );
         dn = dn.add( MetaSchemaConstants.M_OID_AT + "=2.16.840.1.113730.3.2.22" );
 
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attributes );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attributes );
     }
 
     /**
@@ -187,7 +187,7 @@ public class ObjectClassCreateIT extends
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attributes );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attributes );
             fail(); // Should not reach this point
         }
         catch ( NamingException ne )
@@ -222,7 +222,7 @@ public class ObjectClassCreateIT extends
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attributes );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attributes );
             fail(); // Should not reach this point
         }
         catch ( NamingException ne )
@@ -261,7 +261,7 @@ public class ObjectClassCreateIT extends
         entry.put(  "accountStatus", "test" );
 
         // Create the context
-        DirContext system = getSystemContext( service );
+        DirContext system = getSystemContext( getService() );
 
         try
         {
@@ -304,7 +304,7 @@ public class ObjectClassCreateIT extends
         entry.put( "accountStatus", "accountStatusValue" );
 
         // Create the context
-        DirContext system = getSystemContext( service );
+        DirContext system = getSystemContext( getService() );
 
         try
         {

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java Thu Feb 17 17:50:50 2011
@@ -112,14 +112,14 @@ public class SchemaPersistenceIT extends
             checkAttributeTypePresent( "1.3.6.1.4.1.18060.0.4.1.2.10001", "nis", true );
 
             // sync operation happens anyway on shutdowns but just to make sure we can do it again
-            service.sync();
+            getService().sync();
 
-            service.shutdown();
-            service.startup();
+            getService().shutdown();
+            getService().startup();
 
             Attributes attrs = new BasicAttributes( "objectClass", "metaSchema", true );
             attrs.put( "cn", "blah" );
-            getSchemaContext( service ).createSubcontext( "cn=blah", attrs );
+            getSchemaContext( getService() ).createSubcontext( "cn=blah", attrs );
 
             checkAttributeTypePresent( "1.3.6.1.4.1.18060.0.4.1.2.10000", "nis", true );
             checkAttributeTypePresent( "1.3.6.1.4.1.18060.0.4.1.2.10001", "nis", true );
@@ -148,7 +148,7 @@ public class SchemaPersistenceIT extends
         Attributes mods = new BasicAttributes( true );
         mods.put( attr );
 
-        getRootContext( service ).modifyAttributes( JndiUtils.toName( dn ), op, mods );
+        getRootContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), op, mods );
     }
 
 
@@ -158,7 +158,7 @@ public class SchemaPersistenceIT extends
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-disabled", "FALSE" );
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        getSchemaContext( service ).modifyAttributes( "cn=" + schemaName, mods );
+        getSchemaContext( getService() ).modifyAttributes( "cn=" + schemaName, mods );
     }
 
 
@@ -175,7 +175,7 @@ public class SchemaPersistenceIT extends
         controls.setReturningAttributes( new String[]
             { SUBSCHEMA_SUBENTRY } );
 
-        NamingEnumeration<SearchResult> results = getRootContext( service ).search( "", "(objectClass=*)", controls );
+        NamingEnumeration<SearchResult> results = getRootContext( getService() ).search( "", "(objectClass=*)", controls );
         SearchResult result = results.next();
         results.close();
         Attribute subschemaSubentry = result.getAttributes().get( SUBSCHEMA_SUBENTRY );
@@ -196,7 +196,7 @@ public class SchemaPersistenceIT extends
         controls.setReturningAttributes( new String[]
             { "+", "*" } );
 
-        NamingEnumeration<SearchResult> results = getRootContext( service ).search( getSubschemaSubentryDN(),
+        NamingEnumeration<SearchResult> results = getRootContext( getService() ).search( getSubschemaSubentryDN(),
             "(objectClass=*)", controls );
         SearchResult result = results.next();
         results.close();
@@ -244,7 +244,7 @@ public class SchemaPersistenceIT extends
 
         if ( isPresent )
         {
-            attrs = getSchemaContext( service ).getAttributes( "m-oid=" + oid + ",ou=attributeTypes,cn=" + schemaName );
+            attrs = getSchemaContext( getService() ).getAttributes( "m-oid=" + oid + ",ou=attributeTypes,cn=" + schemaName );
             assertNotNull( attrs );
         }
         else
@@ -252,7 +252,7 @@ public class SchemaPersistenceIT extends
             //noinspection EmptyCatchBlock
             try
             {
-                attrs = getSchemaContext( service ).getAttributes(
+                attrs = getSchemaContext( getService() ).getAttributes(
                     "m-oid=" + oid + ",ou=attributeTypes,cn=" + schemaName );
                 fail( "should never get here" );
             }
@@ -268,11 +268,11 @@ public class SchemaPersistenceIT extends
 
         if ( isPresent )
         {
-            assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
+            assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
+            assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
         }
     }
 }

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java Thu Feb 17 17:50:50 2011
@@ -57,7 +57,7 @@ import org.junit.runner.RunWith;
 
 
 /**
- * Test cases for the schema service.  This is for 
+ * Test cases for the schema getService().  This is for 
  * <a href="http://issues.apache.org/jira/browse/DIREVE-276">DIREVE-276</a>.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -100,7 +100,7 @@ public class SchemaServiceIT extends Abs
         
         try
         {
-            getSystemContext( service ).createSubcontext( "uid=invalid", attrs );
+            getSystemContext( getService() ).createSubcontext( "uid=invalid", attrs );
         }
         catch ( SchemaViolationException e )
         {
@@ -125,7 +125,7 @@ public class SchemaServiceIT extends Abs
         
         try
         {
-            getSystemContext( service ).createSubcontext( "cn=Jack Black", attrs );
+            getSystemContext( getService() ).createSubcontext( "cn=Jack Black", attrs );
         }
         catch ( SchemaViolationException e )
         {
@@ -176,14 +176,14 @@ public class SchemaServiceIT extends Abs
         assertFalse( ldifReader.hasNext() );
         
         // should be fine with unique OID
-        service.getAdminSession().add( 
-            new DefaultEntry( service.getSchemaManager(), numberOfGunsAttrEntry.getEntry() ) ); 
+        getService().getAdminSession().add( 
+            new DefaultEntry( getService().getSchemaManager(), numberOfGunsAttrEntry.getEntry() ) ); 
 
         // should blow chuncks using same OID
         try
         {
-            service.getAdminSession().add( 
-                new DefaultEntry( service.getSchemaManager(), shipOCEntry.getEntry() ) ); 
+            getService().getAdminSession().add( 
+                new DefaultEntry( getService().getSchemaManager(), shipOCEntry.getEntry() ) ); 
             
             fail( "Should not be possible to create two schema entities with the same OID." );
         }
@@ -202,7 +202,7 @@ public class SchemaServiceIT extends Abs
     @Test
     public void testFillInObjectClasses() throws Exception
     {
-        LdapContext sysRoot = getSystemContext( service );
+        LdapContext sysRoot = getSystemContext( getService() );
         Attribute ocs = sysRoot.getAttributes( "cn=person0" ).get( "objectClass" );
         assertEquals( 2, ocs.size() );
         assertTrue( ocs.contains( "top" ) );
@@ -232,7 +232,7 @@ public class SchemaServiceIT extends Abs
     @Test
     public void testSearchForPerson() throws Exception
     {
-        LdapContext sysRoot = getSystemContext( service );
+        LdapContext sysRoot = getSystemContext( getService() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
@@ -276,7 +276,7 @@ public class SchemaServiceIT extends Abs
     @Test
     public void testSearchForOrgPerson() throws Exception
     {
-        LdapContext sysRoot = getSystemContext( service );
+        LdapContext sysRoot = getSystemContext( getService() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> orgPersons = new HashMap<String, Attributes>();
@@ -313,7 +313,7 @@ public class SchemaServiceIT extends Abs
     @Test
     public void testSearchForInetOrgPerson() throws Exception
     {
-        LdapContext sysRoot = getSystemContext( service );
+        LdapContext sysRoot = getSystemContext( getService() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> inetOrgPersons = new HashMap<String, Attributes>();
@@ -346,7 +346,7 @@ public class SchemaServiceIT extends Abs
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
         
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( service ).search( "cn=schema", "(objectClass=*)", controls );
+        NamingEnumeration<SearchResult> results = getRootContext( getService() ).search( "cn=schema", "(objectClass=*)", controls );
 
         while ( results.hasMore() )
         {
@@ -381,7 +381,7 @@ public class SchemaServiceIT extends Abs
         controls.setReturningAttributes( new String[]{ "*", "+" } );
         
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( service ).search(
+        NamingEnumeration<SearchResult> results = getRootContext( getService() ).search(
                 "cn=schema", "(objectClass=*)", controls );
 
         while ( results.hasMore() )
@@ -410,7 +410,7 @@ public class SchemaServiceIT extends Abs
         controls.setReturningAttributes( new String[]{ "nameForms" } );
         
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( service )
+        NamingEnumeration<SearchResult> results = getRootContext( getService() )
                 .search( "cn=schema", "(objectClass=*)", controls );
 
         while ( results.hasMore() )
@@ -462,7 +462,7 @@ public class SchemaServiceIT extends Abs
             { "creatorsName", "createTimestamp", "modifiersName", "modifyTimestamp" } );
         
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( service )
+        NamingEnumeration<SearchResult> results = getRootContext( getService() )
         .search( "cn=schema", "(objectClass=subschema)", controls );
         
         while ( results.hasMore() )
@@ -507,7 +507,7 @@ public class SchemaServiceIT extends Abs
         controls.setReturningAttributes( new String[]{ "+" } );
         
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( service )
+        NamingEnumeration<SearchResult> results = getRootContext( getService() )
                 .search( "cn=schema", "(objectClass=nothing)", controls );
 
         while ( results.hasMore() )
@@ -529,7 +529,7 @@ public class SchemaServiceIT extends Abs
         controls.setReturningAttributes( new String[]{ "*", "+" } );
         
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( service )
+        NamingEnumeration<SearchResult> results = getRootContext( getService() )
                 .search( "cn=schema", "(objectClass=top)", controls );
 
         while ( results.hasMore() )
@@ -582,7 +582,7 @@ public class SchemaServiceIT extends Abs
         controls.setReturningAttributes( new String[]{ "*", "+" } );
         
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( service )
+        NamingEnumeration<SearchResult> results = getRootContext( getService() )
                 .search( "cn=schema", "(objectClass=subSchema)", controls );
 
         while ( results.hasMore() )
@@ -632,7 +632,7 @@ public class SchemaServiceIT extends Abs
         controls.setReturningAttributes( new String[]{ "+" } );
         
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( service )
+        NamingEnumeration<SearchResult> results = getRootContext( getService() )
                 .search( "cn=schema", "(objectClass=nothing)", controls );
 
         while ( results.hasMore() )
@@ -654,7 +654,7 @@ public class SchemaServiceIT extends Abs
         controls.setReturningAttributes( new String[]{ "+" } );
         
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( service )
+        NamingEnumeration<SearchResult> results = getRootContext( getService() )
                 .search( "cn=schema", "(&(objectClass=*)(objectClass=top))", controls );
 
         while ( results.hasMore() )
@@ -679,7 +679,7 @@ public class SchemaServiceIT extends Abs
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getSystemContext( service )
+        NamingEnumeration<SearchResult> results = getSystemContext( getService() )
                     .search( "", "(seeAlso=cn=Good One,ou=people,o=sevenSeas)", controls );
 
         while ( results.hasMore() )
@@ -722,7 +722,7 @@ public class SchemaServiceIT extends Abs
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
         controls.setReturningAttributes( new String[] { "9.9.9" } );
 
-        NamingEnumeration<SearchResult> results = getSystemContext( service )
+        NamingEnumeration<SearchResult> results = getSystemContext( getService() )
                 .search( "", "(objectClass=person)", controls );
         
         while ( results.hasMore() )
@@ -771,7 +771,7 @@ public class SchemaServiceIT extends Abs
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
         controls.setReturningAttributes( new String[] { "2.5.6.6" } );
 
-        NamingEnumeration<SearchResult> results = getSystemContext( service )
+        NamingEnumeration<SearchResult> results = getSystemContext( getService() )
                 .search( "", "(objectClass=person)", controls );
         
         while ( results.hasMore() )
@@ -820,7 +820,7 @@ public class SchemaServiceIT extends Abs
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
         controls.setReturningAttributes( new String[] { "person" } );
 
-        NamingEnumeration<SearchResult> results = getSystemContext( service )
+        NamingEnumeration<SearchResult> results = getSystemContext( getService() )
                 .search( "", "(objectClass=person)", controls );
         
         while ( results.hasMore() )
@@ -866,7 +866,7 @@ public class SchemaServiceIT extends Abs
     @Test
     public void testSearchForName() throws Exception
     {
-        LdapContext sysRoot = getSystemContext( service );
+        LdapContext sysRoot = getSystemContext( getService() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
@@ -917,7 +917,7 @@ public class SchemaServiceIT extends Abs
     @Test
     public void testSearchForMetaTop() throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );



Mime
View raw message