From 1daf5cb96fa1ba13d2d7517ef15f9ebd44cf071f Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Fri, 09 Sep 2016 09:45:25 +0000
Subject: [PATCH] OPENDJ-3089 Fix failing tests in SchemaBackendTestCase and TestEntry

---
 opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

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 aa971b1..7ab9666 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
@@ -49,6 +49,7 @@
 import org.forgerock.opendj.ldap.schema.SchemaBuilder;
 import org.forgerock.opendj.server.config.server.SchemaBackendCfg;
 import org.forgerock.util.Utils;
+import org.opends.server.ServerContextBuilder;
 import org.opends.server.TestCaseUtils;
 import org.opends.server.core.AddOperation;
 import org.opends.server.core.DeleteOperationBasis;
@@ -64,7 +65,6 @@
 import org.opends.server.tools.LDAPModify;
 import org.opends.server.types.DirectoryException;
 import org.opends.server.types.Entry;
-import org.opends.server.types.InitializationException;
 import org.opends.server.types.LDIFExportConfig;
 import org.opends.server.types.LDIFImportConfig;
 import org.opends.server.types.LDIFImportResult;
@@ -117,13 +117,16 @@
    *
    * @throws  Exception  If an unexpected problem occurs.
    */
-  @Test(expectedExceptions = { ConfigException.class,
-                               InitializationException.class })
-  public void testInitializeWithNullEntry()
-         throws Exception
+  @Test(expectedExceptions = { ConfigException.class})
+  public void testInitializeWithNullConfigEntry() throws Exception
   {
-    SchemaBackend schemaBackend = new SchemaBackend();
-    schemaBackend.configureBackend(null, null);
+    new SchemaBackend().configureBackend(null, ServerContextBuilder.aServerContext().build());
+  }
+
+  @Test(expectedExceptions = { NullPointerException.class })
+  public void testInitializeWithNullParams() throws Exception
+  {
+    new SchemaBackend().configureBackend(null, null);
   }
 
   /**

--
Gitblit v1.10.0