From 97eaa897d7f912266710fa43d21a4d36de27de41 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 29 Jan 2016 15:01:26 +0000
Subject: [PATCH] *Test*.java: Changed client code from DirectoryServer.getAttributeTypeOrNull() to DirectoryServer.getAttributeType()

---
 opendj-server-legacy/src/test/java/org/opends/server/extensions/FingerprintCertificateMapperTestCase.java                     |    6 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapperTestCase.java |    4 
 opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeRuleTestCase.java                                  |    7 
 opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java                                        |    6 
 opendj-server-legacy/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java                              |    4 
 opendj-server-legacy/src/test/java/org/opends/server/core/SubentryPasswordPolicyTestCase.java                                 |    2 
 opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java                                                 |   23 ++
 opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java                     |    6 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProviderTestCase.java        |    2 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java                         |    2 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/IsMemberOfVirtualAttributeProviderTestCase.java               |    2 
 opendj-server-legacy/src/test/java/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java                           |    8 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/VirtualStaticGroupTestCase.java                               |    4 
 opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java                                           |    2 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapperTestCase.java        |    4 
 opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java                                     |    4 
 opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/LDAPClientTest.java                                    |   24 +-
 opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java                                        |    2 
 opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java                                          |   12 
 opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/DN2IDTest.java                                        |    4 
 opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AttrHistoricalMultipleTest.java                       |    2 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/HasSubordinatesVirtualAttributeProviderTestCase.java          |    2 
 opendj-server-legacy/src/test/java/org/opends/server/types/PrivilegeTestCase.java                                             |    2 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/NumSubordinatesVirtualAttributeProviderTestCase.java          |    2 
 opendj-server-legacy/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java                                    |   22 +-
 opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeTestCase.java                                      |    7 
 opendj-server-legacy/src/test/java/org/opends/server/controls/ServerSideSortControlTestCase.java                              |    4 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryDNVirtualAttributeProviderTestCase.java                  |    2 
 opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ProtocolCompatibilityTest.java                      |    4 
 opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/StateTest.java                                        |    4 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/StructuralObjectClassVirtualAttributeProviderTestCase.java    |    2 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryUUIDVirtualAttributeProviderTestCase.java                |    2 
 opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java                             |    4 
 opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java                                          |    2 
 opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java                                   |    4 
 opendj-server-legacy/src/test/java/org/opends/server/core/PasswordPolicyTestCase.java                                         |    6 
 opendj-server-legacy/src/test/java/org/opends/server/types/TestRDN.java                                                       |    4 
 opendj-server-legacy/src/test/java/org/opends/server/core/SubentryManagerTestCase.java                                        |    8 
 opendj-server-legacy/src/test/java/org/opends/server/types/AttributeBuilderTest.java                                          |    2 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/UserDefinedVirtualAttributeProviderTestCase.java              |    6 
 opendj-server-legacy/src/test/java/org/opends/server/admin/server/AggregationServerTest.java                                  |    8 
 opendj-server-legacy/src/test/java/org/opends/server/types/EntrySchemaCheckingTestCase.java                                   |    5 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java                  |    6 
 opendj-server-legacy/src/test/java/org/opends/server/plugins/LastModPluginTestCase.java                                       |    8 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/GoverningStructureRuleVirtualAttributeProviderTestCase.java   |    2 
 opendj-server-legacy/src/test/java/org/opends/server/plugins/EntryUUIDPluginTestCase.java                                     |    2 
 opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java                        |    2 
 opendj-server-legacy/src/test/java/org/opends/server/types/SearchFilterTests.java                                             |    4 
 opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/SynchronizationMsgTest.java                         |    4 
 opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java                                      |   54 ++----
 opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java                        |   12 
 opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java                               |   19 +
 opendj-server-legacy/src/test/java/org/opends/server/controls/VLVControlTestCase.java                                         |    4 
 opendj-server-legacy/src/test/java/org/opends/server/types/TestEntry.java                                                     |   74 ++++----
 opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/ID2ChildrenCountTest.java                             |    4 
 opendj-server-legacy/src/test/java/org/opends/server/extensions/EntityTagVirtualAttributeProviderTestCase.java                |    6 
 opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java                                   |   16 +-
 opendj-server-legacy/src/test/java/org/opends/server/schema/FakeEntryIndex.java                                               |    2 
 58 files changed, 222 insertions(+), 229 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java b/opendj-server-legacy/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java
index 22593e4..7540b18 100644
--- a/opendj-server-legacy/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java
@@ -21,7 +21,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2013-2015 ForgeRock AS.
+ *      Copyright 2013-2016 ForgeRock AS.
  */
 package org.forgerock.opendj.adapter.server3x;
 
@@ -439,7 +439,7 @@
         byte[] data = { 0x00, 0x01, 0x02, (byte) 0xff };
 
         ByteString attrValue = ByteString.wrap(data);
-        Attribute attribute = Attributes.create(DirectoryServer.getAttributeTypeOrNull("cn"), attrValue);
+        Attribute attribute = Attributes.create(DirectoryServer.getAttributeType("cn"), attrValue);
         assertThat(from(attribute).firstValue().toByteArray()).isEqualTo(data);
     }
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java b/opendj-server-legacy/src/test/java/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java
index 2886d76..45b6447 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java
@@ -28,11 +28,11 @@
 
 import static org.testng.Assert.*;
 
-import org.opends.server.TestCaseUtils;
+import org.forgerock.opendj.ldap.schema.AttributeType;
 import org.opends.server.DirectoryServerTestCase;
+import org.opends.server.TestCaseUtils;
 import org.opends.server.admin.std.meta.RootCfgDefn;
 import org.opends.server.core.DirectoryServer;
-import org.forgerock.opendj.ldap.schema.AttributeType;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -64,7 +64,7 @@
   public void testValidateValue() {
     AttributeTypePropertyDefinition.setCheckSchema(true);
     AttributeTypePropertyDefinition d = createPropertyDefinition();
-    d.validateValue(DirectoryServer.getAttributeTypeOrNull("cn"));
+    d.validateValue(DirectoryServer.getAttributeType("cn"));
   }
 
 
@@ -89,7 +89,7 @@
   public void testDecodeValue(String value) {
     AttributeTypePropertyDefinition.setCheckSchema(true);
     AttributeTypePropertyDefinition d = createPropertyDefinition();
-    AttributeType expected = DirectoryServer.getAttributeTypeOrNull(value);
+    AttributeType expected = DirectoryServer.getAttributeType(value);
     assertEquals(d.decodeValue(value), expected);
   }
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java b/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
index 6df2bde..eca1c89 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
@@ -22,7 +22,7 @@
  *
  *
  *      Copyright 2007-2008 Sun Microsystems, Inc.
- *      Portions Copyright 2015 ForgeRock AS.
+ *      Portions Copyright 2015-2016 ForgeRock AS.
  */
 package org.opends.server.admin.client.ldap;
 
@@ -317,7 +317,7 @@
     TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
     TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
     child.setMandatoryBooleanProperty(true);
-    child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeTypeOrNull("description"));
+    child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
     child.setAggregationProperty(Collections.singleton("LDAP Connection Handler"));
     child.commit();
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/LDAPClientTest.java b/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/LDAPClientTest.java
index 75ccb36..ebb9598 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/LDAPClientTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/LDAPClientTest.java
@@ -22,7 +22,7 @@
  *
  *
  *      Copyright 2008 Sun Microsystems, Inc.
- *      Portions Copyright 2014-2015 ForgeRock AS
+ *      Portions Copyright 2014-2016 ForgeRock AS
  */
 package org.opends.server.admin.client.ldap;
 
@@ -308,7 +308,7 @@
     TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
     TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
     child.setMandatoryBooleanProperty(true);
-    child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeTypeOrNull("description"));
+    child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
     child.commit();
 
     c.assertEntryIsCreated();
@@ -339,7 +339,7 @@
     try {
       TestParentCfgClient parent = createTestParent(ctx, "test parent new");
       parent.setMandatoryBooleanProperty(true);
-      parent.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeTypeOrNull("description"));
+      parent.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
       parent.commit();
     } catch (Exception e) {
       Assert.assertEquals(e.getClass(), expected);
@@ -369,7 +369,7 @@
     ManagementContext ctx = LDAPManagementContext.createFromContext(c);
     TestParentCfgClient parent = createTestParent(ctx, "test parent new");
     parent.setMandatoryBooleanProperty(true);
-    parent.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeTypeOrNull("description"));
+    parent.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
     parent.commit();
     c.assertEntryIsCreated();
   }
@@ -394,7 +394,7 @@
     Assert.assertEquals(child.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
         "dc=default value c3v1,dc=com", "dc=default value c3v2,dc=com");
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
@@ -420,7 +420,7 @@
     Assert.assertEquals(child.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
         "dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com");
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
@@ -480,7 +480,7 @@
     Assert.assertEquals(parent.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(parent.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(),
         "dc=default value p2v1,dc=com", "dc=default value p2v2,dc=com");
   }
@@ -504,7 +504,7 @@
     Assert.assertEquals(parent.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(parent.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(),
         "dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com");
   }
@@ -546,7 +546,7 @@
 
     // Check that the default values are not committed.
     child.setMandatoryBooleanProperty(true);
-    child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeTypeOrNull("description"));
+    child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
     child.commit();
 
     c.assertEntryIsCreated();
@@ -589,7 +589,7 @@
 
     // Check that the default values are not committed.
     child.setMandatoryBooleanProperty(true);
-    child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeTypeOrNull("description"));
+    child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
     child.commit();
 
     c.assertEntryIsCreated();
@@ -807,7 +807,7 @@
       TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
       TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
       child.setMandatoryBooleanProperty(true);
-      child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeTypeOrNull("description"));
+      child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
       child.commit();
 
       c.assertEntryIsCreated();
@@ -846,7 +846,7 @@
       TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
       TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
       child.setMandatoryBooleanProperty(true);
-      child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeTypeOrNull("description"));
+      child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
       child.commit();
       Assert.fail("The add constraint failed to prevent creation of the managed object");
     } finally {
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/admin/server/AggregationServerTest.java b/opendj-server-legacy/src/test/java/org/opends/server/admin/server/AggregationServerTest.java
index dea5bdb..fea01a9 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/admin/server/AggregationServerTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/admin/server/AggregationServerTest.java
@@ -22,7 +22,7 @@
  *
  *
  *      Copyright 2007-2008 Sun Microsystems, Inc.
- *      Portions Copyright 2013-2015 ForgeRock AS
+ *      Portions Copyright 2013-2016 ForgeRock AS
  */
 package org.opends.server.admin.server;
 
@@ -873,7 +873,7 @@
     Assert.assertEquals(child.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertSetEquals(child.getAggregationProperty(), new String[0]);
   }
 
@@ -884,7 +884,7 @@
     Assert.assertEquals(child.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
 
     // Test normalization.
     assertSetEquals(child.getAggregationProperty(), "LDAP Connection Handler");
@@ -901,7 +901,7 @@
     Assert.assertEquals(child.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertSetEquals(child.getAggregationProperty(), "LDAPS Connection Handler",
         "LDAP Connection Handler");
   }
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java b/opendj-server-legacy/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java
index 1eef1fc..cd14c36 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java
@@ -22,7 +22,7 @@
  *
  *
  *      Copyright 2008 Sun Microsystems, Inc.
- *      Portions Copyright 2014-2015 ForgeRock AS
+ *      Portions Copyright 2014-2016 ForgeRock AS
  */
 package org.opends.server.admin.server;
 
@@ -450,7 +450,7 @@
       Assert.assertEquals(child.getMandatoryClassProperty(),
           "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
       Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-          DirectoryServer.getAttributeTypeOrNull("description"));
+          DirectoryServer.getAttributeType("description"));
       assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
           "dc=new value 1,dc=com", "dc=new value 2,dc=com");
       assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
@@ -499,7 +499,7 @@
       Assert.assertEquals(child.getMandatoryClassProperty(),
           "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
       Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-          DirectoryServer.getAttributeTypeOrNull("description"));
+          DirectoryServer.getAttributeType("description"));
       assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
           "dc=new value 1,dc=com", "dc=new value 2,dc=com");
       assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
@@ -547,7 +547,7 @@
       Assert.assertEquals(child.getMandatoryClassProperty(),
           "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
       Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-          DirectoryServer.getAttributeTypeOrNull("description"));
+          DirectoryServer.getAttributeType("description"));
       assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
           "dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com");
       assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
@@ -596,7 +596,7 @@
       Assert.assertEquals(child.getMandatoryClassProperty(),
           "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
       Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-          DirectoryServer.getAttributeTypeOrNull("description"));
+          DirectoryServer.getAttributeType("description"));
       assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
           "dc=new value 1,dc=com", "dc=new value 2,dc=com");
       assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
@@ -713,7 +713,7 @@
     Assert.assertEquals(parent.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(parent.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(),
         "dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com");
   }
@@ -733,7 +733,7 @@
     Assert.assertEquals(parent.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(parent.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(),
         "dc=default value p2v1,dc=com", "dc=default value p2v2,dc=com");
   }
@@ -745,7 +745,7 @@
     Assert.assertEquals(child.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
         "dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com");
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
@@ -759,7 +759,7 @@
     Assert.assertEquals(child.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
         "dc=default value c2v1,dc=com", "dc=default value c2v2,dc=com");
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
@@ -773,7 +773,7 @@
     Assert.assertEquals(child.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
         "dc=default value c3v1,dc=com", "dc=default value c3v2,dc=com");
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
@@ -787,7 +787,7 @@
     Assert.assertEquals(child.getMandatoryClassProperty(),
         "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
     Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
-        DirectoryServer.getAttributeTypeOrNull("description"));
+        DirectoryServer.getAttributeType("description"));
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
         "dc=default value p2v1,dc=com", "dc=default value p2v2,dc=com");
     assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java
index fcde89b..6ee5cb2 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java
@@ -27,6 +27,7 @@
 package org.opends.server.backends;
 
 import static org.opends.server.TestCaseUtils.*;
+import static org.opends.server.core.DirectoryServer.*;
 import static org.opends.server.protocols.internal.InternalClientConnection.*;
 import static org.opends.server.protocols.internal.Requests.*;
 import static org.opends.server.util.StaticUtils.*;
@@ -122,17 +123,10 @@
     assertNotNull(schemaEntry);
     assertEquals(schemaEntry.getName(), schemaDN);
 
-    AttributeType t = DirectoryServer.getAttributeTypeOrNull("attributetypes");
-    assertTrue(schemaEntry.hasAttribute(t));
-
-    t = DirectoryServer.getAttributeTypeOrNull("objectclasses");
-    assertTrue(schemaEntry.hasAttribute(t));
-
-    t = DirectoryServer.getAttributeTypeOrNull("ldapsyntaxes");
-    assertTrue(schemaEntry.hasAttribute(t));
-
-    t = DirectoryServer.getAttributeTypeOrNull("matchingrules");
-    assertTrue(schemaEntry.hasAttribute(t));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("attributetypes")));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("objectclasses")));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("ldapsyntaxes")));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("matchingrules")));
   }
 
   /**
@@ -169,34 +163,20 @@
     assertNotNull(schemaEntry);
     assertEquals(schemaEntry.getName(), schemaDN);
 
-    AttributeType t = DirectoryServer.getAttributeTypeOrNull("attributetypes");
-    assertTrue(schemaEntry.hasAttribute(t));
-
-    t = DirectoryServer.getAttributeTypeOrNull("objectclasses");
-    assertTrue(schemaEntry.hasAttribute(t));
-
-    t = DirectoryServer.getAttributeTypeOrNull("ldapsyntaxes");
-    assertTrue(schemaEntry.hasAttribute(t));
-
-    t = DirectoryServer.getAttributeTypeOrNull("matchingrules");
-    assertTrue(schemaEntry.hasAttribute(t));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("attributetypes")));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("objectclasses")));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("ldapsyntaxes")));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("matchingrules")));
 
     schemaDN    = DN.valueOf("cn=subschema");
     schemaEntry = schemaBackend.getSchemaEntry(schemaDN, false);
     assertNotNull(schemaEntry);
     assertEquals(schemaEntry.getName(), schemaDN);
 
-    t = DirectoryServer.getAttributeTypeOrNull("attributetypes");
-    assertTrue(schemaEntry.hasAttribute(t));
-
-    t = DirectoryServer.getAttributeTypeOrNull("objectclasses");
-    assertTrue(schemaEntry.hasAttribute(t));
-
-    t = DirectoryServer.getAttributeTypeOrNull("ldapsyntaxes");
-    assertTrue(schemaEntry.hasAttribute(t));
-
-    t = DirectoryServer.getAttributeTypeOrNull("matchingrules");
-    assertTrue(schemaEntry.hasAttribute(t));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("attributetypes")));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("objectclasses")));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("ldapsyntaxes")));
+    assertTrue(schemaEntry.hasAttribute(getAttributeType("matchingrules")));
   }
 
   /**
@@ -376,10 +356,10 @@
          throws Exception
   {
     DN schemaDN = DN.valueOf("cn=schema");
-    AttributeType a = DirectoryServer.getAttributeTypeOrNull("attributetypes");
-    AttributeType o = DirectoryServer.getAttributeTypeOrNull("objectclasses");
-    AttributeType m = DirectoryServer.getAttributeTypeOrNull("matchingrules");
-    AttributeType s = DirectoryServer.getAttributeTypeOrNull("ldapsyntaxes");
+    AttributeType a = DirectoryServer.getAttributeType("attributetypes");
+    AttributeType o = DirectoryServer.getAttributeType("objectclasses");
+    AttributeType m = DirectoryServer.getAttributeType("matchingrules");
+    AttributeType s = DirectoryServer.getAttributeType("ldapsyntaxes");
 
     assertFalse(schemaBackend.showAllAttributes());
     Entry schemaEntry = schemaBackend.getSchemaEntry(schemaDN, false);
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/DN2IDTest.java b/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/DN2IDTest.java
index 0e56e9a..948d14e 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/DN2IDTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/DN2IDTest.java
@@ -21,7 +21,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2015 ForgeRock AS
+ *      Copyright 2015-2016 ForgeRock AS
  */
 package org.opends.server.backends.pluggable;
 
@@ -332,7 +332,7 @@
 
     BackendIndexCfg indexCfg = legacyMockCfg(BackendIndexCfg.class);
     when(indexCfg.getIndexType()).thenReturn(newTreeSet(IndexType.PRESENCE, IndexType.EQUALITY));
-    when(indexCfg.getAttribute()).thenReturn(DirectoryServer.getAttributeTypeOrNull("sn"));
+    when(indexCfg.getAttribute()).thenReturn(DirectoryServer.getAttributeType("sn"));
     when(backendCfg.getBackendIndex("sn")).thenReturn(indexCfg);
 
     return backendCfg;
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/ID2ChildrenCountTest.java b/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/ID2ChildrenCountTest.java
index 2728e06..d9cd200 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/ID2ChildrenCountTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/ID2ChildrenCountTest.java
@@ -21,7 +21,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2015 ForgeRock AS
+ *      Copyright 2015-2016 ForgeRock AS
  */
 package org.opends.server.backends.pluggable;
 
@@ -248,7 +248,7 @@
 
     BackendIndexCfg indexCfg = legacyMockCfg(BackendIndexCfg.class);
     when(indexCfg.getIndexType()).thenReturn(newTreeSet(IndexType.PRESENCE, IndexType.EQUALITY));
-    when(indexCfg.getAttribute()).thenReturn(DirectoryServer.getAttributeTypeOrNull("sn"));
+    when(indexCfg.getAttribute()).thenReturn(DirectoryServer.getAttributeType("sn"));
     when(backendCfg.getBackendIndex("sn")).thenReturn(indexCfg);
 
     return backendCfg;
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java
index bdd16f0..8e93f0e 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java
@@ -168,7 +168,7 @@
     for (Map.Entry<String, IndexType[]> index : backendIndexes.entrySet())
     {
       final String attributeName = index.getKey();
-      final AttributeType attribute = DirectoryServer.getAttributeTypeOrNull(attributeName);
+      final AttributeType attribute = DirectoryServer.getAttributeType(attributeName);
       Reject.ifNull(attribute, "Attribute type '" + attributeName + "' doesn't exists.");
 
       BackendIndexCfg indexCfg = mock(BackendIndexCfg.class);
@@ -626,7 +626,7 @@
     {
       for (IndexType type : index.getValue())
       {
-        final AttributeType attributeType = DirectoryServer.getAttributeTypeOrNull(index.getKey());
+        final AttributeType attributeType = DirectoryServer.getAttributeType(index.getKey());
         assertTrue(backend.isIndexed(attributeType,
             org.opends.server.types.IndexType.valueOf(type.toString().toUpperCase())));
       }
@@ -677,7 +677,7 @@
     Entry oldEntry = workEntries.get(0);
     Entry newEntry = oldEntry.duplicate(false);
 
-    modifyAttribute = DirectoryServer.getAttributeTypeOrNull("jpegphoto");
+    modifyAttribute = DirectoryServer.getAttributeType("jpegphoto");
     List<Modification> mods = Arrays.asList(
         // unindexed
         new Modification(ADD, create(modifyAttribute, modifyValue)),
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/StateTest.java b/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/StateTest.java
index 45162a4..1501834 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/StateTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/StateTest.java
@@ -21,7 +21,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2015 ForgeRock AS
+ *      Copyright 2015-2016 ForgeRock AS
  */
 package org.opends.server.backends.pluggable;
 
@@ -195,7 +195,7 @@
 
     BackendIndexCfg indexCfg = legacyMockCfg(BackendIndexCfg.class);
     when(indexCfg.getIndexType()).thenReturn(newTreeSet(IndexType.PRESENCE, IndexType.EQUALITY));
-    when(indexCfg.getAttribute()).thenReturn(DirectoryServer.getAttributeTypeOrNull("sn"));
+    when(indexCfg.getAttribute()).thenReturn(DirectoryServer.getAttributeType("sn"));
     when(backendCfg.getBackendIndex("sn")).thenReturn(indexCfg);
 
     return backendCfg;
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java b/opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java
index 001c1eb..73fda64 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java
@@ -120,7 +120,7 @@
     }
 
 
-    AttributeType attType = DirectoryServer.getAttributeTypeOrNull(type);
+    AttributeType attType = DirectoryServer.getAttributeType(type);
     ByteString attVal = null;
     if (attType != null)
     {
@@ -199,7 +199,7 @@
 
     // input parameter
     String             rawAttTypeTest = type;
-    AttributeType         attTypeTest = DirectoryServer.getAttributeTypeOrNull(type);
+    AttributeType         attTypeTest = DirectoryServer.getAttributeType(type);
     ByteString            subInitialTest = ByteString.valueOfUtf8(subInitial);
     List<ByteString> subAnyTest = new ArrayList<>(subAny.size());
     for (String s : subAny)
@@ -377,7 +377,7 @@
     }
 
     // ( AttributeType attributeType, ByteString assertionValue
-    AttributeType attType = DirectoryServer.getAttributeTypeOrNull(type);
+    AttributeType attType = DirectoryServer.getAttributeType(type);
     ByteString attVal = null;
     if (attType != null)
     {
@@ -473,7 +473,7 @@
     }
 
 
-    AttributeType attType = DirectoryServer.getAttributeTypeOrNull(type);
+    AttributeType attType = DirectoryServer.getAttributeType(type);
     ByteString attVal = null ;
     if (attType != null)
     {
@@ -549,7 +549,7 @@
     assertEquals(mvf.getMatchType(), MatchedValuesFilter.PRESENT_TYPE);
 
     // ( AttributeType attributeType
-    AttributeType attType = DirectoryServer.getAttributeTypeOrNull(type);
+    AttributeType attType = DirectoryServer.getAttributeType(type);
 
     try
     {
@@ -618,7 +618,7 @@
     }
 
     // ( AttributeType attributeType, ByteString assertionValue
-    AttributeType attType = DirectoryServer.getAttributeTypeOrNull(type);
+    AttributeType attType = DirectoryServer.getAttributeType(type);
     ByteString attVal = null ;
     if (attType != null)
     {
@@ -690,7 +690,7 @@
 
     // input value
     String          rawAttTypeTest = type ;
-    AttributeType      attTypeTest = DirectoryServer.getAttributeTypeOrNull(type) ;
+    AttributeType      attTypeTest = DirectoryServer.getAttributeType(type) ;
     String             matchingRuleIdTest = matchingRule.getOID() ;
     ByteString    attValueTest = (attTypeTest == null) ? null : ByteString.valueOfUtf8(value);
     // parameter used for the test.
@@ -800,7 +800,7 @@
   public void testDifferentNormalization(String type, ByteString value,
                                          String assertion)
   {
-    AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("usercertificate");
+    AttributeType attrType = DirectoryServer.getAttributeType("usercertificate");
     MatchedValuesFilter mvf = MatchedValuesFilter.createEqualityFilter(type, ByteString.valueOfUtf8(assertion));
     assertTrue(mvf.valueMatches(attrType, value));
   }
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/controls/ServerSideSortControlTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/controls/ServerSideSortControlTestCase.java
index 01574ff..f265218 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/controls/ServerSideSortControlTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/controls/ServerSideSortControlTestCase.java
@@ -97,10 +97,10 @@
   {
     TestCaseUtils.startServer();
 
-    givenNameType = DirectoryServer.getAttributeTypeOrNull("givenname");
+    givenNameType = DirectoryServer.getAttributeType("givenname");
     assertNotNull(givenNameType);
 
-    snType = DirectoryServer.getAttributeTypeOrNull("sn");
+    snType = DirectoryServer.getAttributeType("sn");
     assertNotNull(snType);
 
     aaccfJohnsonDN    = DN.valueOf("uid=aaccf.johnson,dc=example,dc=com");
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/controls/VLVControlTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/controls/VLVControlTestCase.java
index 5cdc9a2..96cb0a0 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/controls/VLVControlTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/controls/VLVControlTestCase.java
@@ -97,10 +97,10 @@
   {
     TestCaseUtils.startServer();
 
-    givenNameType = DirectoryServer.getAttributeTypeOrNull("givenname");
+    givenNameType = DirectoryServer.getAttributeType("givenname");
     assertNotNull(givenNameType);
 
-    snType = DirectoryServer.getAttributeTypeOrNull("sn");
+    snType = DirectoryServer.getAttributeType("sn");
     assertNotNull(snType);
 
     aaccfJohnsonDN    = DN.valueOf("uid=aaccf.johnson,dc=example,dc=com");
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java
index 374bb63..27029ae 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java
@@ -1187,7 +1187,7 @@
          "objectClass: organization",
          "o: test");
 
-    AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("description");
+    AttributeType attrType = DirectoryServer.getAttributeType("description");
     Map<AttributeType,List<Attribute>> userAttrs = entry.getUserAttributes();
     userAttrs.put(attrType, newArrayList(Attributes.empty(attrType)));
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/PasswordPolicyTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/PasswordPolicyTestCase.java
index e0f2123..3d73ac6 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/core/PasswordPolicyTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/core/PasswordPolicyTestCase.java
@@ -2194,7 +2194,7 @@
   {
     PasswordPolicy p = DirectoryServer.getDefaultPasswordPolicy();
     AttributeType  t = p.getPasswordAttribute();
-    assertEquals(t, DirectoryServer.getAttributeTypeOrNull("userpassword"));
+    assertEquals(t, DirectoryServer.getAttributeType("userpassword"));
   }
 
 
@@ -2213,7 +2213,7 @@
                       "cn=config");
     PasswordPolicy p = (PasswordPolicy) DirectoryServer.getAuthenticationPolicy(dn);
     AttributeType  t = p.getPasswordAttribute();
-    assertEquals(t, DirectoryServer.getAttributeTypeOrNull("authpassword"));
+    assertEquals(t, DirectoryServer.getAttributeType("authpassword"));
   }
 
 
@@ -4313,7 +4313,7 @@
   {
     Entry entry = DirectoryServer.getEntry(DN.valueOf(dn));
     assertNotNull(entry);
-    AttributeType pwdHistory = DirectoryServer.getAttributeTypeOrNull("pwdhistory");
+    AttributeType pwdHistory = DirectoryServer.getAttributeType("pwdhistory");
     assertNotNull(pwdHistory);
     Attribute historyAttr = entry.getExactAttribute(pwdHistory, null);
     assertNotNull(historyAttr);
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/SubentryManagerTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/SubentryManagerTestCase.java
index 7f9330f..fdb5f57 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/core/SubentryManagerTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/core/SubentryManagerTestCase.java
@@ -331,7 +331,7 @@
   private void hasValues(DN dn, String attrName, String... values) throws DirectoryException
   {
     Entry entry = DirectoryServer.getEntry(dn);
-    AttributeType attrType = DirectoryServer.getAttributeTypeOrNull(attrName);
+    AttributeType attrType = DirectoryServer.getAttributeType(attrName);
     assertTrue(entry.hasAttribute(attrType));
     for (String value : values)
     {
@@ -342,7 +342,7 @@
   private void doesNotHaveValues(DN dn, String attrName, String... values) throws DirectoryException
   {
     Entry entry = DirectoryServer.getEntry(dn);
-    AttributeType attrType = DirectoryServer.getAttributeTypeOrNull(attrName);
+    AttributeType attrType = DirectoryServer.getAttributeType(attrName);
     assertTrue(entry.hasAttribute(attrType));
     for (String value : values)
     {
@@ -353,7 +353,7 @@
   private void hasNoAttribute(DN dn, String attrName) throws Exception
   {
     Entry entry = DirectoryServer.getEntry(dn);
-    AttributeType attrType = DirectoryServer.getAttributeTypeOrNull(attrName);
+    AttributeType attrType = DirectoryServer.getAttributeType(attrName);
     assertFalse(entry.hasAttribute(attrType));
   }
 
@@ -366,7 +366,7 @@
 
     assertEquals(searchOperation.getResultCode(), ResultCode.SUCCESS);
     assertEquals(searchOperation.getEntriesSent(), 1);
-    AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("collectiveattributesubentries");
+    AttributeType attrType = DirectoryServer.getAttributeType("collectiveattributesubentries");
     Entry e = searchOperation.getSearchEntries().getFirst();
     assertTrue(e.hasValue(attrType, null, ByteString.valueOfObject(collectiveSubentry.getName())));
   }
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/SubentryPasswordPolicyTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/SubentryPasswordPolicyTestCase.java
index 4b46f92..1560503 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/core/SubentryPasswordPolicyTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/core/SubentryPasswordPolicyTestCase.java
@@ -415,7 +415,7 @@
     Entry testEntry = DirectoryServer.getEntry(DN.valueOf("uid=rogasawara," + BASE));
     assertNotNull(testEntry);
 
-    AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("pwdpolicysubentry");
+    AttributeType attrType = DirectoryServer.getAttributeType("pwdpolicysubentry");
 
     // Make sure that default policy is in effect
     // for the user entry.
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java b/opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java
index c53c927..c27376c 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java
@@ -431,7 +431,7 @@
 
   private void assertAttrValue(Entry newEntry, String attrName, String expectedAttrValue)
   {
-    AttributeType at = DirectoryServer.getAttributeTypeOrNull(attrName);
+    AttributeType at = DirectoryServer.getAttributeType(attrName);
     List<Attribute> attrList = newEntry.getAttribute(at);
     assertThat(attrList).hasSize(1);
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntityTagVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntityTagVirtualAttributeProviderTestCase.java
index 20e7ca8..f338e6b 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntityTagVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntityTagVirtualAttributeProviderTestCase.java
@@ -221,7 +221,7 @@
     TestCaseUtils.startServer();
 
     // Initialize the provider.
-    config.getExcludedAttribute().add(DirectoryServer.getAttributeTypeOrNull("modifytimestamp"));
+    config.getExcludedAttribute().add(DirectoryServer.getAttributeType("modifytimestamp"));
     provider.initializeVirtualAttributeProvider(config);
   }
 
@@ -453,7 +453,7 @@
     final SearchOperation searchOp = mock(SearchOperation.class);
 
     VirtualAttributeRule rule = new VirtualAttributeRule(
-        DirectoryServer.getAttributeTypeOrNull(ETAG), provider,
+        DirectoryServer.getAttributeType(ETAG), provider,
         Collections.<DN> emptySet(), SearchScope.WHOLE_SUBTREE,
         Collections.<DN> emptySet(), Collections.<SearchFilter> emptySet(),
         VirtualAttributeCfgDefn.ConflictBehavior.REAL_OVERRIDES_VIRTUAL);
@@ -739,7 +739,7 @@
 
   private VirtualAttributeRule getRule()
   {
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("etag");
+    AttributeType type = DirectoryServer.getAttributeType("etag");
     return new VirtualAttributeRule(type, provider,
         Collections.<DN>emptySet(), SearchScope.WHOLE_SUBTREE,
         Collections.<DN>emptySet(),
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryDNVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryDNVirtualAttributeProviderTestCase.java
index 9037285..0506af5 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryDNVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryDNVirtualAttributeProviderTestCase.java
@@ -82,7 +82,7 @@
     TestCaseUtils.initializeTestBackend(true);
     TestCaseUtils.clearBackend("userRoot", "dc=example,dc=com");
 
-    entryDNType = DirectoryServer.getAttributeTypeOrNull("entrydn");
+    entryDNType = DirectoryServer.getAttributeType("entrydn");
     assertNotNull(entryDNType);
   }
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryUUIDVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryUUIDVirtualAttributeProviderTestCase.java
index 4008a06..f9daa16 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryUUIDVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryUUIDVirtualAttributeProviderTestCase.java
@@ -77,7 +77,7 @@
   {
     TestCaseUtils.startServer();
 
-    entryUUIDType = DirectoryServer.getAttributeTypeOrNull("entryuuid");
+    entryUUIDType = DirectoryServer.getAttributeType("entryuuid");
     assertNotNull(entryUUIDType);
   }
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java
index 54fa9b1..0881045 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java
@@ -144,7 +144,7 @@
          "ds-cfg-enabled: true",
          "ds-cfg-match-attribute: uid");
 
-    AttributeType t = DirectoryServer.getAttributeTypeOrNull("ds-cfg-match-base-dn");
+    AttributeType t = DirectoryServer.getAttributeType("ds-cfg-match-base-dn");
     e.addAttribute(Attributes.empty(t), new ArrayList<ByteString>());
     entries.add(e);
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/FingerprintCertificateMapperTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/FingerprintCertificateMapperTestCase.java
index 5a6bd3e..6930355 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/FingerprintCertificateMapperTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/FingerprintCertificateMapperTestCase.java
@@ -22,7 +22,7 @@
  *
  *
  *      Copyright 2008 Sun Microsystems, Inc.
- *      Portions Copyright 2012-2015 ForgeRock AS
+ *      Portions Copyright 2012-2016 ForgeRock AS
  */
 package org.opends.server.extensions;
 
@@ -443,7 +443,7 @@
   {
     String mapperDN = "cn=Fingerprint Mapper,cn=Certificate Mappers,cn=config";
 
-    Attribute a = Attributes.empty(DirectoryServer.getAttributeTypeOrNull("ds-cfg-fingerprint-attribute"));
+    Attribute a = Attributes.empty(DirectoryServer.getAttributeType("ds-cfg-fingerprint-attribute"));
 
     ArrayList<Modification> mods = newArrayList(new Modification(DELETE, a));
     ModifyOperation modifyOperation =
@@ -463,7 +463,7 @@
   {
     String mapperDN = "cn=Fingerprint Mapper,cn=Certificate Mappers,cn=config";
 
-    Attribute a = Attributes.empty(DirectoryServer.getAttributeTypeOrNull("ds-cfg-fingerprint-algorithm"));
+    Attribute a = Attributes.empty(DirectoryServer.getAttributeType("ds-cfg-fingerprint-algorithm"));
 
     ArrayList<Modification> mods = newArrayList(new Modification(DELETE, a));
     ModifyOperation modifyOperation =
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/GoverningStructureRuleVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/GoverningStructureRuleVirtualAttributeProviderTestCase.java
index 5d54de6..d7e2834 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/GoverningStructureRuleVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/GoverningStructureRuleVirtualAttributeProviderTestCase.java
@@ -81,7 +81,7 @@
     TestCaseUtils.initializeTestBackend(true);
     TestCaseUtils.clearBackend("userRoot", "dc=example,dc=com");
 
-    governingStructureRuleType = DirectoryServer.getAttributeTypeOrNull("governingstructurerule");
+    governingStructureRuleType = DirectoryServer.getAttributeType("governingstructurerule");
     assertNotNull(governingStructureRuleType);
     int resultCode = TestCaseUtils.applyModifications(true,
     "dn: cn=schema",
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/HasSubordinatesVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/HasSubordinatesVirtualAttributeProviderTestCase.java
index 43d5720..d277344 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/HasSubordinatesVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/HasSubordinatesVirtualAttributeProviderTestCase.java
@@ -71,7 +71,7 @@
   {
     TestCaseUtils.startServer();
 
-    hasSubordinatesType = DirectoryServer.getAttributeTypeOrNull("hassubordinates");
+    hasSubordinatesType = DirectoryServer.getAttributeType("hassubordinates");
     assertNotNull(hasSubordinatesType);
 
     entries = TestCaseUtils.makeEntries(
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/IsMemberOfVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/IsMemberOfVirtualAttributeProviderTestCase.java
index 9998a80..4d54c44 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/IsMemberOfVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/IsMemberOfVirtualAttributeProviderTestCase.java
@@ -80,7 +80,7 @@
   {
     TestCaseUtils.restartServer();
 
-    isMemberOfType = DirectoryServer.getAttributeTypeOrNull("ismemberof");
+    isMemberOfType = DirectoryServer.getAttributeType("ismemberof");
     assertNotNull(isMemberOfType);
   }
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/NumSubordinatesVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/NumSubordinatesVirtualAttributeProviderTestCase.java
index 733b9d6..444757e 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/NumSubordinatesVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/NumSubordinatesVirtualAttributeProviderTestCase.java
@@ -67,7 +67,7 @@
   {
     TestCaseUtils.restartServer();
 
-    numSubordinatesType = DirectoryServer.getAttributeTypeOrNull("numsubordinates");
+    numSubordinatesType = DirectoryServer.getAttributeType("numsubordinates");
     assertNotNull(numSubordinatesType);
 
     entries = TestCaseUtils.makeEntries(
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java
index e1aac3a..82b5039 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java
@@ -1696,7 +1696,7 @@
 
     try
     {
-      AttributeType lastLoginTimeAttr = DirectoryServer.getAttributeTypeOrNull("ds-pwp-last-login-time");
+      AttributeType lastLoginTimeAttr = DirectoryServer.getAttributeType("ds-pwp-last-login-time");
       assertNotNull(lastLoginTimeAttr);
 
       DN userDN = DN.valueOf("uid=test.user,o=test");
@@ -1753,7 +1753,7 @@
 
     try
     {
-      AttributeType authFailureTimesAttr = DirectoryServer.getAttributeTypeOrNull("pwdfailuretime");
+      AttributeType authFailureTimesAttr = DirectoryServer.getAttributeType("pwdfailuretime");
       assertNotNull(authFailureTimesAttr);
 
       DN userDN = DN.valueOf("uid=test.user,o=test");
@@ -1804,7 +1804,7 @@
 
     try
     {
-      AttributeType pwdHistoryAttr = DirectoryServer.getAttributeTypeOrNull("pwdhistory");
+      AttributeType pwdHistoryAttr = DirectoryServer.getAttributeType("pwdhistory");
       assertNotNull(pwdHistoryAttr);
 
       DN userDN = DN.valueOf("uid=test.user,o=test");
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/StructuralObjectClassVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/StructuralObjectClassVirtualAttributeProviderTestCase.java
index 72ed39c..ea1a50b 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/StructuralObjectClassVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/StructuralObjectClassVirtualAttributeProviderTestCase.java
@@ -78,7 +78,7 @@
     TestCaseUtils.initializeTestBackend(true);
     TestCaseUtils.clearBackend("userRoot", "dc=example,dc=com");
 
-    structuralObjectClassType = DirectoryServer.getAttributeTypeOrNull("structuralobjectclass");
+    structuralObjectClassType = DirectoryServer.getAttributeType("structuralobjectclass");
     assertNotNull(structuralObjectClassType);
   }
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapperTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapperTestCase.java
index 3e7eb5b..6034b3c 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapperTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapperTestCase.java
@@ -716,7 +716,7 @@
   {
     String mapperDN = "cn=Subject Attribute to User Attribute,cn=Certificate Mappers,cn=config";
 
-    Attribute a = Attributes.empty(DirectoryServer.getAttributeTypeOrNull("ds-cfg-subject-attribute-mapping"));
+    Attribute a = Attributes.empty(DirectoryServer.getAttributeType("ds-cfg-subject-attribute-mapping"));
 
     ArrayList<Modification> mods = newArrayList(
         new Modification(ModificationType.DELETE, a));
@@ -896,7 +896,7 @@
   {
     String mapperDN = "cn=Subject Attribute to User Attribute,cn=Certificate Mappers,cn=config";
 
-    AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("ds-cfg-user-base-dn");
+    AttributeType attrType = DirectoryServer.getAttributeType("ds-cfg-user-base-dn");
     AttributeBuilder builder = new AttributeBuilder(attrType);
     if (baseDNs != null)
     {
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapperTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapperTestCase.java
index 4b92dd7..dd67408 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapperTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapperTestCase.java
@@ -542,7 +542,7 @@
          throws Exception
   {
     String mapperDN = "cn=Subject DN to User Attribute,cn=Certificate Mappers,cn=config";
-    Attribute a = Attributes.empty(DirectoryServer.getAttributeTypeOrNull("ds-cfg-subject-attribute"));
+    Attribute a = Attributes.empty(DirectoryServer.getAttributeType("ds-cfg-subject-attribute"));
 
     ArrayList<Modification> mods = newArrayList(new Modification(ModificationType.DELETE, a));
     ModifyOperation modifyOperation =
@@ -652,7 +652,7 @@
   {
     String mapperDN = "cn=Subject DN to User Attribute,cn=Certificate Mappers,cn=config";
 
-    AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("ds-cfg-user-base-dn");
+    AttributeType attrType = DirectoryServer.getAttributeType("ds-cfg-user-base-dn");
     AttributeBuilder builder = new AttributeBuilder(attrType);
     if (baseDNs != null)
     {
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProviderTestCase.java
index 09f26a3..b23798b 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProviderTestCase.java
@@ -77,7 +77,7 @@
     TestCaseUtils.initializeTestBackend(true);
     TestCaseUtils.clearBackend("userRoot", "dc=example,dc=com");
 
-    subschemaSubentryType = DirectoryServer.getAttributeTypeOrNull("subschemasubentry");
+    subschemaSubentryType = DirectoryServer.getAttributeType("subschemasubentry");
     assertNotNull(subschemaSubentryType);
   }
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/UserDefinedVirtualAttributeProviderTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/UserDefinedVirtualAttributeProviderTestCase.java
index 42a234a..1cec92f 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/UserDefinedVirtualAttributeProviderTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/UserDefinedVirtualAttributeProviderTestCase.java
@@ -77,13 +77,13 @@
   {
     TestCaseUtils.startServer();
 
-    descriptionType = DirectoryServer.getAttributeTypeOrNull("description");
+    descriptionType = DirectoryServer.getAttributeType("description");
     assertNotNull(descriptionType);
 
-    pwPolicyDNType = DirectoryServer.getAttributeTypeOrNull("ds-pwp-password-policy-dn");
+    pwPolicyDNType = DirectoryServer.getAttributeType("ds-pwp-password-policy-dn");
     assertNotNull(pwPolicyDNType);
 
-    privNameType = DirectoryServer.getAttributeTypeOrNull("ds-privilege-name");
+    privNameType = DirectoryServer.getAttributeType("ds-privilege-name");
     assertNotNull(privNameType);
   }
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/VirtualStaticGroupTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/VirtualStaticGroupTestCase.java
index 3cb7e62..649bfe1 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/VirtualStaticGroupTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/VirtualStaticGroupTestCase.java
@@ -253,10 +253,10 @@
   {
     TestCaseUtils.startServer();
 
-    memberType = DirectoryServer.getAttributeTypeOrNull("member");
+    memberType = DirectoryServer.getAttributeType("member");
     assertNotNull(memberType);
 
-    uniqueMemberType = DirectoryServer.getAttributeTypeOrNull("uniquemember");
+    uniqueMemberType = DirectoryServer.getAttributeType("uniquemember");
     assertNotNull(uniqueMemberType);
 
     groupManager = DirectoryServer.getGroupManager();
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/plugins/EntryUUIDPluginTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/plugins/EntryUUIDPluginTestCase.java
index 092bf75..1f3a418 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/plugins/EntryUUIDPluginTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/plugins/EntryUUIDPluginTestCase.java
@@ -156,7 +156,7 @@
   public void testInitializeWithValidConfigsWithoutSchema(Entry e)
          throws Exception
   {
-    AttributeType entryUUIDType = DirectoryServer.getAttributeTypeOrNull("entryuuid");
+    AttributeType entryUUIDType = DirectoryServer.getAttributeType("entryuuid");
     DirectoryServer.deregisterAttributeType(entryUUIDType);
 
     HashSet<PluginType> pluginTypes = TestCaseUtils.getPluginTypes(e);
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/plugins/LastModPluginTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/plugins/LastModPluginTestCase.java
index 8e3010a..04896ae 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/plugins/LastModPluginTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/plugins/LastModPluginTestCase.java
@@ -174,10 +174,10 @@
   public void testInitializeWithValidConfigsWithoutSchema(Entry e)
          throws Exception
   {
-    AttributeType ctType = DirectoryServer.getAttributeTypeOrNull("createtimestamp");
-    AttributeType cnType = DirectoryServer.getAttributeTypeOrNull("creatorsname");
-    AttributeType mtType = DirectoryServer.getAttributeTypeOrNull("modifytimestamp");
-    AttributeType mnType = DirectoryServer.getAttributeTypeOrNull("modifiersname");
+    AttributeType ctType = DirectoryServer.getAttributeType("createtimestamp");
+    AttributeType cnType = DirectoryServer.getAttributeType("creatorsname");
+    AttributeType mtType = DirectoryServer.getAttributeType("modifytimestamp");
+    AttributeType mnType = DirectoryServer.getAttributeType("modifiersname");
 
     DirectoryServer.deregisterAttributeType(ctType);
     DirectoryServer.deregisterAttributeType(cnType);
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java
index 4b0231a..02f4b77 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java
@@ -22,7 +22,7 @@
  *
  *
  *      Copyright 2007-2010 Sun Microsystems, Inc.
- *      Portions Copyright 2011-2015 ForgeRock AS
+ *      Portions Copyright 2011-2016 ForgeRock AS
  */
 package org.opends.server.replication;
 
@@ -144,7 +144,7 @@
       int sequence;
       for (sequence = 1; sequence<=addSequenceLength; sequence ++)
       {
-        entry.removeAttribute(getAttributeTypeOrNull("entryuuid"));
+        entry.removeAttribute(getAttributeType("entryuuid"));
         entry.addAttribute(Attributes.create("entryuuid", stringUID(sequence+1)),
                            new LinkedList<ByteString>());
         addDN = DN.valueOf("dc=dependency" + sequence + "," + addDN);
@@ -271,7 +271,7 @@
           baseDN, brokerId, 1000, replServer.getReplicationPort(), 1000, CLEAN_DB_GENERATION_ID);
 
       // add an entry to play with.
-      entry.removeAttribute(getAttributeTypeOrNull("entryuuid"));
+      entry.removeAttribute(getAttributeType("entryuuid"));
       entry.addAttribute(Attributes.create("entryuuid",
                          stringUID(renamedEntryUuid)),
                          new LinkedList<ByteString>());
@@ -370,7 +370,7 @@
       for (sequence = 1; sequence<=addSequenceLength; sequence ++)
       {
         // add the entry a first time
-        entry.removeAttribute(getAttributeTypeOrNull("entryuuid"));
+        entry.removeAttribute(getAttributeType("entryuuid"));
         entry.addAttribute(Attributes.create("entryuuid", stringUID(sequence+1)),
                            new LinkedList<ByteString>());
         DN addDN = DN.valueOf("dc=dependency" + sequence + "," + TEST_ROOT_DN_STRING);
@@ -378,7 +378,7 @@
         broker.publish(delMsg(addDN, sequence + 1, gen));
 
         // add again the entry with a new entryuuid.
-        entry.removeAttribute(getAttributeTypeOrNull("entryuuid"));
+        entry.removeAttribute(getAttributeType("entryuuid"));
         entry.addAttribute(Attributes.create("entryuuid", stringUID(sequence+1025)),
                            new LinkedList<ByteString>());
         broker.publish(addMsg(addDN, entry, sequence + 1025, 1, gen));
@@ -476,7 +476,7 @@
       for (sequence = 1; sequence<=addSequenceLength; sequence ++)
       {
         // add the entry
-        entry.removeAttribute(getAttributeTypeOrNull("entryuuid"));
+        entry.removeAttribute(getAttributeType("entryuuid"));
         entry.addAttribute(Attributes.create("entryuuid", stringUID(sequence+1)),
                            new LinkedList<ByteString>());
         addDN = DN.valueOf("dc=dependency" + sequence + "," + TEST_ROOT_DN_STRING);
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java
index 9aa3970..16ae47d 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java
@@ -480,7 +480,7 @@
     {
       debugInfo("Entry found <" + baseDN + ">");
 
-      AttributeType synchronizationGenIDType = DirectoryServer.getAttributeTypeOrNull(REPLICATION_GENERATION_ID);
+      AttributeType synchronizationGenIDType = DirectoryServer.getAttributeType(REPLICATION_GENERATION_ID);
       Attribute attr = resultEntry.getExactAttribute(synchronizationGenIDType, new HashSet<String>());
       return Long.valueOf(attr.iterator().next().toString());
     }
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java
index 1f5135b..d8b79f2 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java
@@ -427,8 +427,8 @@
   {
     testSetUp("modifyConflicts");
     final DN dn1 = DN.valueOf("cn=test1," + baseDN);
-    final AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("displayname");
-    final AttributeType entryuuidType = DirectoryServer.getAttributeTypeOrNull("entryuuid");
+    final AttributeType attrType = DirectoryServer.getAttributeType("displayname");
+    final AttributeType entryuuidType = DirectoryServer.getAttributeType("entryuuid");
     String monitorAttr = "resolved-modify-conflicts";
 
     /*
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AttrHistoricalMultipleTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AttrHistoricalMultipleTest.java
index a48afb3..d7ef9a7 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AttrHistoricalMultipleTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AttrHistoricalMultipleTest.java
@@ -162,7 +162,7 @@
     assertEquals(attrInfo4.getValuesHistorical().size(), 1);
 
     // Check
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull(ATTRIBUTE_NAME);
+    AttributeType type = DirectoryServer.getAttributeType(ATTRIBUTE_NAME);
     attrInfo3.delete(Attributes.create(type, att), updateTime) ;
     assertEquals(attrInfo3.getValuesHistorical().size(), 1);
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java
index c6932e8..1667325 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java
@@ -549,7 +549,7 @@
       debugInfo("Entry found <" + rootDn + ">");
 
       AttributeType synchronizationGenIDType =
-          DirectoryServer.getAttributeTypeOrNull(REPLICATION_GENERATION_ID);
+          DirectoryServer.getAttributeType(REPLICATION_GENERATION_ID);
       List<Attribute> attrs = resultEntry.getAttribute(synchronizationGenIDType);
       if (!attrs.isEmpty())
       {
@@ -685,7 +685,7 @@
           {
             if (!first)
             {
-              assertFalse(newEntry.hasAttribute(DirectoryServer.getAttributeTypeOrNull(fracAttr)));
+              assertFalse(newEntry.hasAttribute(DirectoryServer.getAttributeType(fracAttr)));
             }
             first = false;
           }
@@ -702,7 +702,7 @@
             }
             first = false;
           }
-          assertFalse(newEntry.hasAttribute(DirectoryServer.getAttributeTypeOrNull(OPTIONAL_ATTR)));
+          assertFalse(newEntry.hasAttribute(DirectoryServer.getAttributeType(OPTIONAL_ATTR)));
           break;
         default:
           fail("Unexpected fractional mode.");
@@ -740,7 +740,7 @@
           {
             if (!first)
             {
-              assertFalse(entry.hasAttribute(DirectoryServer.getAttributeTypeOrNull(fracAttr)));
+              assertFalse(entry.hasAttribute(DirectoryServer.getAttributeType(fracAttr)));
             }
             first = false;
           }
@@ -757,7 +757,7 @@
             }
             first = false;
           }
-          assertFalse(entry.hasAttribute(DirectoryServer.getAttributeTypeOrNull(OPTIONAL_ATTR)));
+          assertFalse(entry.hasAttribute(DirectoryServer.getAttributeType(OPTIONAL_ATTR)));
           break;
         default:
           fail("Unexpected fractional mode.");
@@ -976,7 +976,7 @@
   private Entry waitTillEntryHasSynchroAttribute(String entryDN)
       throws Exception
   {
-    AttributeType synchroAttrType = DirectoryServer.getAttributeTypeOrNull(SYNCHRO_OPTIONAL_ATTR);
+    AttributeType synchroAttrType = DirectoryServer.getAttributeType(SYNCHRO_OPTIONAL_ATTR);
     DN dn = DN.valueOf(entryDN);
 
     Entry entry = null;
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java
index 29c45fd..56f55c8 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java
@@ -150,7 +150,7 @@
       long startTime = TimeThread.getTime();
       final DN dn1 = DN.valueOf("cn=test1," + baseDN);
     final AttributeType histType =
-      DirectoryServer.getAttributeTypeOrNull(EntryHistorical.HISTORICAL_ATTRIBUTE_NAME);
+      DirectoryServer.getAttributeType(EntryHistorical.HISTORICAL_ATTRIBUTE_NAME);
 
     logger.error(LocalizableMessage.raw("Starting replication test : changesCmpTest"));
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java
index 1a4d0fa..cfed051 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java
@@ -233,8 +233,8 @@
     final DN dn1 = DN.valueOf("cn=test1," + TEST_ROOT_DN_STRING);
     final DN dn2 = DN.valueOf("cn=test2," + TEST_ROOT_DN_STRING);
     final DN baseDN = DN.valueOf(TEST_ROOT_DN_STRING);
-    final AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("displayname");
-    final AttributeType entryuuidType = DirectoryServer.getAttributeTypeOrNull("entryuuid");
+    final AttributeType attrType = DirectoryServer.getAttributeType("displayname");
+    final AttributeType entryuuidType = DirectoryServer.getAttributeType("entryuuid");
 
     /*
      * Open a session to the replicationServer using the broker API.
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
index a512d5d..203cd8b 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
@@ -35,6 +35,7 @@
 
 import org.forgerock.opendj.ldap.ByteString;
 import org.forgerock.opendj.ldap.ModificationType;
+import org.forgerock.opendj.ldap.schema.AttributeType;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.core.ModifyOperationBasis;
 import org.opends.server.replication.ReplicationTestCase;
@@ -42,8 +43,14 @@
 import org.opends.server.replication.protocol.LDAPUpdateMsg;
 import org.opends.server.replication.protocol.ModifyContext;
 import org.opends.server.replication.protocol.ReplicationMsg;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.types.*;
+import org.opends.server.types.Attribute;
+import org.opends.server.types.AttributeBuilder;
+import org.opends.server.types.Attributes;
+import org.opends.server.types.DN;
+import org.opends.server.types.DirectoryException;
+import org.opends.server.types.Entry;
+import org.opends.server.types.Modification;
+import org.opends.server.types.ObjectClass;
 import org.opends.server.workflowelement.localbackend.LocalBackendModifyOperation;
 import org.testng.annotations.Test;
 
@@ -1077,7 +1084,7 @@
     UUID uuid = UUID.randomUUID();
 
     // Create the att values list
-    AttributeType entryuuidAttrType = getAttributeTypeOrNull(ENTRYUUID_ATTRIBUTE_NAME);
+    AttributeType entryuuidAttrType = getAttributeType(ENTRYUUID_ATTRIBUTE_NAME);
     List<Attribute> uuidList = Attributes.createAsList(entryuuidAttrType, uuid.toString());
 
     // Add the uuid in the entry
@@ -1165,7 +1172,7 @@
    */
   private void assertEntryHistoricalEncodingDecoding(Entry entry, EntryHistorical hist)
   {
-    entry.removeAttribute(getAttributeTypeOrNull(HISTORICAL_ATTRIBUTE_NAME));
+    entry.removeAttribute(getAttributeType(HISTORICAL_ATTRIBUTE_NAME));
     entry.addAttribute(hist.encodeAndPurge(), null);
     EntryHistorical hist2 = EntryHistorical.newInstanceFromEntry(entry);
     assertEquals(hist2.encodeAndPurge(), hist.encodeAndPurge());
@@ -1197,7 +1204,7 @@
 
   private void assertContainsOnlyValues(Entry entry, String attrName, String... expectedValues)
   {
-    Attribute attr = entry.getExactAttribute(getAttributeTypeOrNull(attrName), Collections.<String> emptySet());
+    Attribute attr = entry.getExactAttribute(getAttributeType(attrName), Collections.<String> emptySet());
     assertThat(attr).hasSize(expectedValues.length);
     for (String value : expectedValues)
     {
@@ -1218,7 +1225,7 @@
 
   private String getEntryUUID(Entry entry)
   {
-    AttributeType entryuuidAttrType = getAttributeTypeOrNull(ENTRYUUID_ATTRIBUTE_NAME);
+    AttributeType entryuuidAttrType = getAttributeType(ENTRYUUID_ATTRIBUTE_NAME);
     List<Attribute> uuidAttrs = entry.getOperationalAttributes().get(entryuuidAttrType);
     return uuidAttrs.get(0).iterator().next().toString();
   }
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ProtocolCompatibilityTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ProtocolCompatibilityTest.java
index be224d4..364464d 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ProtocolCompatibilityTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ProtocolCompatibilityTest.java
@@ -445,7 +445,7 @@
     CSN csn1 = new CSN(1, 0, 1);
     CSN csn2 = new CSN(TimeThread.getTime(), 123, 45);
 
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("description");
+    AttributeType type = DirectoryServer.getAttributeType("description");
 
     Attribute attr1 = Attributes.create("description", "new value");
     Modification mod1 = new Modification(ModificationType.REPLACE, attr1);
@@ -621,7 +621,7 @@
   @DataProvider(name = "createModifyDnData")
   public Object[][] createModifyDnData() {
 
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("description");
+    AttributeType type = DirectoryServer.getAttributeType("description");
 
     Attribute attr1 = Attributes.create("description", "new value");
     Modification mod1 = new Modification(ModificationType.REPLACE, attr1);
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/SynchronizationMsgTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/SynchronizationMsgTest.java
index 12f262f..06c483d 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/SynchronizationMsgTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/SynchronizationMsgTest.java
@@ -88,7 +88,7 @@
     CSN csn2 = new CSN(TimeThread.getTime(), 123,  45);
     CSN csn3 = new CSN(TimeThread.getTime(), 67894123,  45678);
 
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("description");
+    AttributeType type = DirectoryServer.getAttributeType("description");
 
     Attribute attr1 = Attributes.create("description", "new value");
     Modification mod1 = new Modification(ModificationType.REPLACE, attr1);
@@ -325,7 +325,7 @@
   @DataProvider(name = "createModifyDnData")
   public Object[][] createModifyDnData() {
 
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("description");
+    AttributeType type = DirectoryServer.getAttributeType("description");
 
     Attribute attr1 = Attributes.create("description", "new value");
     Modification mod1 = new Modification(ModificationType.REPLACE, attr1);
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/schema/FakeEntryIndex.java b/opendj-server-legacy/src/test/java/org/opends/server/schema/FakeEntryIndex.java
index 4b3c7de..9f9c649 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/schema/FakeEntryIndex.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/schema/FakeEntryIndex.java
@@ -60,7 +60,7 @@
 
   FakeEntryIndex(String attrName) throws DecodeException
   {
-    attrType = DirectoryServer.getAttributeTypeOrNull(attrName);
+    attrType = DirectoryServer.getAttributeType(attrName);
     if (attrType == null)
     {
       throw new IllegalArgumentException("Cannot find attribute with name \"" + attrName + "\"");
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java
index a155e61..37184fe 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java
@@ -177,7 +177,7 @@
         continue;
       }
 
-      AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("attributetypes");
+      AttributeType attrType = DirectoryServer.getAttributeType("attributetypes");
       assertNotNull(attrType);
       List<Attribute> attrList = e.getAttribute(attrType);
       if (attrList.isEmpty())
@@ -251,7 +251,7 @@
         continue;
       }
 
-      AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("objectclasses");
+      AttributeType attrType = DirectoryServer.getAttributeType("objectclasses");
       assertNotNull(attrType);
       List<Attribute> attrList = e.getAttribute(attrType);
       if (attrList.isEmpty())
@@ -325,7 +325,7 @@
         continue;
       }
 
-      AttributeType attrType = DirectoryServer.getAttributeTypeOrNull("nameforms");
+      AttributeType attrType = DirectoryServer.getAttributeType("nameforms");
       assertNotNull(attrType);
       List<Attribute> attrList = e.getAttribute(attrType);
       if (attrList.isEmpty())
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/AttributeBuilderTest.java b/opendj-server-legacy/src/test/java/org/opends/server/types/AttributeBuilderTest.java
index 2d06741..ce7e2b0 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/types/AttributeBuilderTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/types/AttributeBuilderTest.java
@@ -535,7 +535,7 @@
     TestCaseUtils.startServer();
 
     // Initialize the CN attribute type used in all tests.
-    cnType = DirectoryServer.getAttributeTypeOrNull("cn");
+    cnType = DirectoryServer.getAttributeType("cn");
     Assert.assertNotNull(cnType);
 
     cnValue = ByteString.valueOfUtf8("john doe");
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/EntrySchemaCheckingTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/types/EntrySchemaCheckingTestCase.java
index f55efdb..e9fcb2e 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/types/EntrySchemaCheckingTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/types/EntrySchemaCheckingTestCase.java
@@ -26,8 +26,6 @@
  */
 package org.opends.server.types;
 
-import org.forgerock.opendj.ldap.schema.AttributeType;
-
 import static org.opends.server.types.AcceptRejectWarn.*;
 import static org.testng.Assert.*;
 
@@ -35,6 +33,7 @@
 
 import org.forgerock.i18n.LocalizableMessageBuilder;
 import org.forgerock.opendj.ldap.ByteString;
+import org.forgerock.opendj.ldap.schema.AttributeType;
 import org.opends.server.TestCaseUtils;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.tools.LDAPModify;
@@ -454,7 +453,7 @@
          "objectClass: domain",
          "dc: example");
 
-    AttributeType creatorsNameType = DirectoryServer.getAttributeTypeOrNull("creatorsname");
+    AttributeType creatorsNameType = DirectoryServer.getAttributeType("creatorsname");
     assertTrue(creatorsNameType.isOperational());
 
     AttributeBuilder builder = new AttributeBuilder(creatorsNameType,
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/PrivilegeTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/types/PrivilegeTestCase.java
index 4cf10dd..32a46f5 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/types/PrivilegeTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/types/PrivilegeTestCase.java
@@ -446,7 +446,7 @@
   {
     assertEquals(conn.hasPrivilege(Privilege.CONFIG_READ, null), hasPrivilege);
 
-    AttributeType cnAttrType = DirectoryServer.getAttributeTypeOrNull("cn");
+    AttributeType cnAttrType = DirectoryServer.getAttributeType("cn");
     CompareOperation compareOperation = conn.processCompare(
         DN.valueOf("cn=config"), cnAttrType, ByteString.valueOfUtf8("config"));
     if (hasPrivilege)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/SearchFilterTests.java b/opendj-server-legacy/src/test/java/org/opends/server/types/SearchFilterTests.java
index 374662a..5bba699 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/types/SearchFilterTests.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/types/SearchFilterTests.java
@@ -579,7 +579,7 @@
     FilterDescription description = new FilterDescription();
 
     description.filterType = filterType;
-    description.attributeType = DirectoryServer.getAttributeTypeOrNull(attributeType);
+    description.attributeType = DirectoryServer.getAttributeType(attributeType);
     description.assertionValue = ByteString.valueOfUtf8(attributeValue);
 
     if (filterType == FilterType.EQUALITY) {
@@ -641,7 +641,7 @@
     FilterDescription description = new FilterDescription();
 
     description.filterType = FilterType.SUBSTRING;
-    description.attributeType = DirectoryServer.getAttributeTypeOrNull(attributeType);
+    description.attributeType = DirectoryServer.getAttributeType(attributeType);
 
     description.subInitialElement = ByteString.valueOfUtf8(subInitial);
     description.subAnyElements = new ArrayList<>();
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/TestEntry.java b/opendj-server-legacy/src/test/java/org/opends/server/types/TestEntry.java
index f38ac02..6eeb9a0 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/types/TestEntry.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/types/TestEntry.java
@@ -129,8 +129,8 @@
    */
   @Test
   public void testParseAttributeNotFound() throws Exception {
-    AttributeType type1 = DirectoryServer.getAttributeTypeOrNull("description");
-    AttributeType type2 = DirectoryServer.getAttributeTypeOrNull("inheritable");
+    AttributeType type1 = DirectoryServer.getAttributeType("description");
+    AttributeType type2 = DirectoryServer.getAttributeType("inheritable");
 
     Entry entry = createTestEntry(type1, "hello world");
 
@@ -142,7 +142,7 @@
    */
   @Test
   public void testParseAttributeBooleanTrue() throws Exception {
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("inheritable");
+    AttributeType type = DirectoryServer.getAttributeType("inheritable");
 
     Entry entry = createTestEntry(type, "true");
 
@@ -155,7 +155,7 @@
   @Test
   public void testParseAttributeBooleanFalse() throws Exception
   {
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("inheritable");
+    AttributeType type = DirectoryServer.getAttributeType("inheritable");
 
     Entry entry = createTestEntry(type, "false");
 
@@ -168,7 +168,7 @@
   @Test(expectedExceptions = LocalizedIllegalArgumentException.class)
   public void testParseAttributeBooleanBad() throws Exception
   {
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("inheritable");
+    AttributeType type = DirectoryServer.getAttributeType("inheritable");
 
     Entry entry = createTestEntry(type, "bad-value");
     entry.parseAttribute(type.getNameOrOID()).asBoolean();
@@ -185,7 +185,7 @@
   @Test
   public void testParseAttributesInteger() throws Exception
   {
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("supportedldapversion");
+    AttributeType type = DirectoryServer.getAttributeType("supportedldapversion");
     String[] values = new String[] { "-4", "-2", "0", "1", "3" };
 
     HashSet<Integer> expected = new HashSet<>();
@@ -208,7 +208,7 @@
   @Test(expectedExceptions = LocalizedIllegalArgumentException.class)
   public void testParseAttributeIntegerBad() throws Exception
   {
-    AttributeType type = DirectoryServer.getAttributeTypeOrNull("supportedldapversion");
+    AttributeType type = DirectoryServer.getAttributeType("supportedldapversion");
     String[] values = new String[] { "-4", "-2", "xxx", "1", "3" };
 
     Entry entry = createTestEntry(type, values);
@@ -288,11 +288,11 @@
     assertTrue(e.conformsToSchema(null, false, false, false,
                                   new LocalizableMessageBuilder()));
 
-    AttributeType ocType   = DirectoryServer.getAttributeTypeOrNull("objectclass");
-    AttributeType cnType   = DirectoryServer.getAttributeTypeOrNull("cn");
-    AttributeType nameType = DirectoryServer.getAttributeTypeOrNull("name");
-    AttributeType uidType  = DirectoryServer.getAttributeTypeOrNull("uid");
-    AttributeType mnType   = DirectoryServer.getAttributeTypeOrNull("modifiersname");
+    AttributeType ocType   = DirectoryServer.getAttributeType("objectclass");
+    AttributeType cnType   = DirectoryServer.getAttributeType("cn");
+    AttributeType nameType = DirectoryServer.getAttributeType("name");
+    AttributeType uidType  = DirectoryServer.getAttributeType("uid");
+    AttributeType mnType   = DirectoryServer.getAttributeType("modifiersname");
 
     assertTrue(e.hasAttribute(ocType));
     assertTrue(e.hasAttribute(cnType));
@@ -376,11 +376,11 @@
     assertTrue(e.conformsToSchema(null, false, false, false,
                                   new LocalizableMessageBuilder()));
 
-    AttributeType ocType   = DirectoryServer.getAttributeTypeOrNull("objectclass");
-    AttributeType cnType   = DirectoryServer.getAttributeTypeOrNull("cn");
-    AttributeType nameType = DirectoryServer.getAttributeTypeOrNull("name");
-    AttributeType uidType  = DirectoryServer.getAttributeTypeOrNull("uid");
-    AttributeType mnType   = DirectoryServer.getAttributeTypeOrNull("modifiersname");
+    AttributeType ocType   = DirectoryServer.getAttributeType("objectclass");
+    AttributeType cnType   = DirectoryServer.getAttributeType("cn");
+    AttributeType nameType = DirectoryServer.getAttributeType("name");
+    AttributeType uidType  = DirectoryServer.getAttributeType("uid");
+    AttributeType mnType   = DirectoryServer.getAttributeType("modifiersname");
 
     assertFalse(e.hasUserAttribute(ocType));
     assertTrue(e.hasUserAttribute(cnType));
@@ -422,11 +422,11 @@
     assertTrue(e.conformsToSchema(null, false, false, false,
                                   new LocalizableMessageBuilder()));
 
-    AttributeType ocType   = DirectoryServer.getAttributeTypeOrNull("objectclass");
-    AttributeType cnType   = DirectoryServer.getAttributeTypeOrNull("cn");
-    AttributeType nameType = DirectoryServer.getAttributeTypeOrNull("name");
-    AttributeType uidType  = DirectoryServer.getAttributeTypeOrNull("uid");
-    AttributeType mnType   = DirectoryServer.getAttributeTypeOrNull("modifiersname");
+    AttributeType ocType   = DirectoryServer.getAttributeType("objectclass");
+    AttributeType cnType   = DirectoryServer.getAttributeType("cn");
+    AttributeType nameType = DirectoryServer.getAttributeType("name");
+    AttributeType uidType  = DirectoryServer.getAttributeType("uid");
+    AttributeType mnType   = DirectoryServer.getAttributeType("modifiersname");
 
     assertFalse(e.hasOperationalAttribute(ocType));
     assertFalse(e.hasOperationalAttribute(cnType));
@@ -468,11 +468,11 @@
     assertTrue(e.conformsToSchema(null, false, false, false,
                                   new LocalizableMessageBuilder()));
 
-    AttributeType ocType   = DirectoryServer.getAttributeTypeOrNull("objectclass");
-    AttributeType cnType   = DirectoryServer.getAttributeTypeOrNull("cn");
-    AttributeType nameType = DirectoryServer.getAttributeTypeOrNull("name");
-    AttributeType uidType  = DirectoryServer.getAttributeTypeOrNull("uid");
-    AttributeType mnType   = DirectoryServer.getAttributeTypeOrNull("modifiersname");
+    AttributeType ocType   = DirectoryServer.getAttributeType("objectclass");
+    AttributeType cnType   = DirectoryServer.getAttributeType("cn");
+    AttributeType nameType = DirectoryServer.getAttributeType("name");
+    AttributeType uidType  = DirectoryServer.getAttributeType("uid");
+    AttributeType mnType   = DirectoryServer.getAttributeType("modifiersname");
 
     assertThat(e.getAttribute(ocType)).hasSize(1);
     assertThat(e.getAttribute(cnType)).hasSize(2);
@@ -559,11 +559,11 @@
     assertTrue(e.conformsToSchema(null, false, false, false,
                                   new LocalizableMessageBuilder()));
 
-    AttributeType ocType   = DirectoryServer.getAttributeTypeOrNull("objectclass");
-    AttributeType cnType   = DirectoryServer.getAttributeTypeOrNull("cn");
-    AttributeType nameType = DirectoryServer.getAttributeTypeOrNull("name");
-    AttributeType uidType  = DirectoryServer.getAttributeTypeOrNull("uid");
-    AttributeType mnType   = DirectoryServer.getAttributeTypeOrNull("modifiersname");
+    AttributeType ocType   = DirectoryServer.getAttributeType("objectclass");
+    AttributeType cnType   = DirectoryServer.getAttributeType("cn");
+    AttributeType nameType = DirectoryServer.getAttributeType("name");
+    AttributeType uidType  = DirectoryServer.getAttributeType("uid");
+    AttributeType mnType   = DirectoryServer.getAttributeType("modifiersname");
 
     assertThat(e.getUserAttribute(ocType)).isEmpty();
     assertThat(e.getUserAttribute(cnType)).hasSize(2);
@@ -605,11 +605,11 @@
     assertTrue(e.conformsToSchema(null, false, false, false,
                                   new LocalizableMessageBuilder()));
 
-    AttributeType ocType   = DirectoryServer.getAttributeTypeOrNull("objectclass");
-    AttributeType cnType   = DirectoryServer.getAttributeTypeOrNull("cn");
-    AttributeType nameType = DirectoryServer.getAttributeTypeOrNull("name");
-    AttributeType uidType  = DirectoryServer.getAttributeTypeOrNull("uid");
-    AttributeType mnType   = DirectoryServer.getAttributeTypeOrNull("modifiersname");
+    AttributeType ocType   = DirectoryServer.getAttributeType("objectclass");
+    AttributeType cnType   = DirectoryServer.getAttributeType("cn");
+    AttributeType nameType = DirectoryServer.getAttributeType("name");
+    AttributeType uidType  = DirectoryServer.getAttributeType("uid");
+    AttributeType mnType   = DirectoryServer.getAttributeType("modifiersname");
 
     assertThat(e.getOperationalAttribute(ocType)).isEmpty();
     assertThat(e.getOperationalAttribute(cnType)).isEmpty();
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/TestRDN.java b/opendj-server-legacy/src/test/java/org/opends/server/types/TestRDN.java
index ff1614b..218af4f 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/types/TestRDN.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/types/TestRDN.java
@@ -69,8 +69,8 @@
     // we'll start the server.
     TestCaseUtils.startServer();
 
-    AT_DC = DirectoryServer.getAttributeTypeOrNull("dc");
-    AT_CN = DirectoryServer.getAttributeTypeOrNull("cn");
+    AT_DC = DirectoryServer.getAttributeType("dc");
+    AT_CN = DirectoryServer.getAttributeType("cn");
 
     String attrName = "x-test-integer-type";
     AttributeType dummy = getAttributeType(attrName, getDefaultIntegerSyntax());
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeRuleTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeRuleTestCase.java
index 3e0203e..6e04cc7 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeRuleTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeRuleTestCase.java
@@ -26,12 +26,13 @@
  */
 package org.opends.server.types;
 
-import org.forgerock.opendj.ldap.schema.AttributeType;
+import static org.testng.Assert.*;
 
 import java.util.Collections;
 import java.util.LinkedHashSet;
 
 import org.forgerock.opendj.ldap.SearchScope;
+import org.forgerock.opendj.ldap.schema.AttributeType;
 import org.opends.server.TestCaseUtils;
 import org.opends.server.admin.std.meta.VirtualAttributeCfgDefn.ConflictBehavior;
 import org.opends.server.core.DirectoryServer;
@@ -41,8 +42,6 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import static org.testng.Assert.*;
-
 /**
  * This class provides a set of test cases for virtual attribute rules, which
  * link a virtual attribute provider implementation with an attribute type and a
@@ -68,7 +67,7 @@
   {
     TestCaseUtils.startServer();
 
-    entryDNType = DirectoryServer.getAttributeTypeOrNull("entrydn");
+    entryDNType = DirectoryServer.getAttributeType("entrydn");
     assertNotNull(entryDNType);
   }
 
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeTestCase.java
index bdd103d..eb80f60 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeTestCase.java
@@ -26,7 +26,7 @@
  */
 package org.opends.server.types;
 
-import org.forgerock.opendj.ldap.schema.AttributeType;
+import static org.testng.Assert.*;
 
 import java.util.Collections;
 import java.util.LinkedHashSet;
@@ -34,6 +34,7 @@
 import org.forgerock.opendj.ldap.ByteString;
 import org.forgerock.opendj.ldap.ConditionResult;
 import org.forgerock.opendj.ldap.SearchScope;
+import org.forgerock.opendj.ldap.schema.AttributeType;
 import org.opends.server.TestCaseUtils;
 import org.opends.server.admin.std.meta.VirtualAttributeCfgDefn.ConflictBehavior;
 import org.opends.server.core.DirectoryServer;
@@ -41,8 +42,6 @@
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import static org.testng.Assert.*;
-
 /**
  * This class provides a set of test cases for virtual attributes.
  */
@@ -71,7 +70,7 @@
   {
     TestCaseUtils.startServer();
 
-    entryDNType = DirectoryServer.getAttributeTypeOrNull("entrydn");
+    entryDNType = DirectoryServer.getAttributeType("entrydn");
     assertNotNull(entryDNType);
 
     EntryDNVirtualAttributeProvider provider =
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java b/opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java
index 8ea0135..3aa45c7 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java
@@ -37,10 +37,19 @@
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.opendj.ldap.ByteString;
 import org.forgerock.opendj.ldap.ModificationType;
+import org.forgerock.opendj.ldap.schema.AttributeType;
 import org.opends.server.TestCaseUtils;
 import org.opends.server.core.DirectoryServer;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.types.*;
+import org.opends.server.types.Attribute;
+import org.opends.server.types.AttributeBuilder;
+import org.opends.server.types.Attributes;
+import org.opends.server.types.DN;
+import org.opends.server.types.Entry;
+import org.opends.server.types.LDIFImportConfig;
+import org.opends.server.types.Modification;
+import org.opends.server.types.ObjectClass;
+import org.opends.server.types.RDN;
+import org.opends.server.types.RawModification;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
@@ -177,10 +186,10 @@
     OC_PERSON = DirectoryServer.getObjectClass("person");
 
     AT_OC = DirectoryServer.getObjectClassAttributeType();
-    AT_CN = DirectoryServer.getAttributeTypeOrNull("cn");
-    AT_SN = DirectoryServer.getAttributeTypeOrNull("sn");
-    AT_DESCR = DirectoryServer.getAttributeTypeOrNull("description");
-    AT_TELN = DirectoryServer.getAttributeTypeOrNull("telephonenumber");
+    AT_CN = DirectoryServer.getAttributeType("cn");
+    AT_SN = DirectoryServer.getAttributeType("sn");
+    AT_DESCR = DirectoryServer.getAttributeType("description");
+    AT_TELN = DirectoryServer.getAttributeType("telephonenumber");
 
     // Create a temporary file containing an attribute value.
     TEMP_FILE = File.createTempFile("tmp", "txt");
@@ -560,7 +569,7 @@
       Assert.assertTrue(i.hasNext());
       mod = i.next().toModification();
       Assert.assertEquals(mod.getModificationType(), ModificationType.REPLACE);
-      attr = Attributes.empty(DirectoryServer.getAttributeTypeOrNull("postaladdress"));
+      attr = Attributes.empty(DirectoryServer.getAttributeType("postaladdress"));
       Assert.assertEquals(mod.getAttribute(), attr);
 
       // Change record #7.

--
Gitblit v1.10.0