mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
02.03.2014 8b7bcb9600d220c64647902a8dc86a7e11107498
Code cleanup

TestCaseUtils.java:
Split clearJEBackend(boolean, String backendID, String dn) in two:
- clearJEBackend(String backendID, String dn) to clear the backend and recreate the base entry
- clearJEBackend(String backendID) to clear the backend without recreating the base entry
34 files modified
622 ■■■■ changed files
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java 126 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/authorization/dseecompat/AciTestCase.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestEntryContainer.java 18 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestImportJob.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestRebuildJob.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestVLVIndex.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestVerifyJob.java 17 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/controls/ServerSideSortControlTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/controls/VLVControlTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/BindOperationTestCase.java 101 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/GroupManagerTestCase.java 72 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/ModifyOperationTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SubentryManagerTestCase.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SubentryPasswordPolicyTestCase.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/TestModifyDNOperation.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/EntryDNVirtualAttributeProviderTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/EntryUUIDVirtualAttributeProviderTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/GoverningStructureRuleVirtualAttributeProviderTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/HasSubordinatesVirtualAttributeProviderTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/NumSubordinatesVirtualAttributeProviderTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/StructuralObjectClassVirtualAttributeProviderTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProviderTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/plugins/ReferentialIntegrityPluginTestCase.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/plugins/UniqueAttributePluginTestCase.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ReSyncTest.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/FractionalReplicationTest.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/StateMachineTest.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/CollationMatchingRuleTest.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/StringPrepProfileTestCase.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/TimeBasedMatchingRuleTest.java 12 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java 178 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElementTest.java 12 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
@@ -80,6 +80,9 @@
import com.forgerock.opendj.util.OperatingSystem;
import static org.opends.server.loggers.TextAccessLogPublisher.*;
import static org.opends.server.loggers.TextErrorLogPublisher.*;
import static org.opends.server.loggers.TextHTTPAccessLogPublisher.*;
import static org.opends.server.protocols.internal.InternalClientConnection.*;
import static org.opends.server.util.CollectionUtils.*;
import static org.opends.server.util.ServerConstants.*;
@@ -155,28 +158,26 @@
   */
  public static final String TEST_ROOT_DN_STRING = "o=test";
  /**
   * The backend if for the test backend
   */
  /** The backend if for the test backend. */
  public static final String TEST_BACKEND_ID = "test";
  /**
   * The string representation of the OpenDMK jar file location
   * that will be used as base to determine if snmp is included or not
   * that will be used as base to determine if snmp is included or not.
   */
  public static final String PROPERTY_OPENDMK_LOCATION =
          "org.opends.server.snmp.opendmk";
  /** The test text writer for the Debug Logger */
  /** The test text writer for the Debug Logger. */
  public static TestTextWriter DEBUG_TEXT_WRITER = new TestTextWriter();
  /** The test text writer for the Error Logger */
  /** The test text writer for the Error Logger. */
  public static TestTextWriter ERROR_TEXT_WRITER = new TestTextWriter();
  /** The test text writer for the Access Logger */
  /** The test text writer for the Access Logger. */
  public static TestTextWriter ACCESS_TEXT_WRITER = new TestTextWriter();
  /** The test text writer for the HTTP Access Logger */
  /** The test text writer for the HTTP Access Logger. */
  public static TestTextWriter HTTP_ACCESS_TEXT_WRITER = new TestTextWriter();
  /**
@@ -184,7 +185,7 @@
   * constant must not be altered by anything outside the
   * <CODE>startServer</CODE> method.
   */
  public static boolean SERVER_STARTED = false;
  public static boolean SERVER_STARTED;
  /**
   * This is used to store the schema as it was before starting the fake server
@@ -216,7 +217,7 @@
  /**
   * Incremented by one each time the server has restarted.
   */
  private static int serverRestarts = 0;
  private static int serverRestarts;
  /**
   * The config directory in the test environment.
@@ -289,10 +290,8 @@
      File   testSrcRoot = new File(buildRoot + File.separator + "tests" +
                                    File.separator + "unit-tests-testng");
      String cleanupRequiredString =
              System.getProperty(PROPERTY_CLEANUP_REQUIRED, "true");
      boolean cleanupRequired =
          !cleanupRequiredString.equalsIgnoreCase("false");
      String cleanupRequiredString = System.getProperty(PROPERTY_CLEANUP_REQUIRED, "true");
      boolean cleanupRequired = !"false".equalsIgnoreCase(cleanupRequiredString);
      if (cleanupRequired) {
        deleteDirectory(testInstallRoot);
@@ -480,16 +479,14 @@
              testInstanceRoot.getAbsolutePath());
      AccessLogger.getInstance().addLogPublisher(
          (AccessLogPublisher) TextAccessLogPublisher
              .getStartupTextAccessPublisher(ACCESS_TEXT_WRITER, false));
          (AccessLogPublisher) getStartupTextAccessPublisher(ACCESS_TEXT_WRITER, false));
      HTTPAccessLogger.getInstance().addLogPublisher(
          (HTTPAccessLogPublisher) TextHTTPAccessLogPublisher
              .getStartupTextHTTPAccessPublisher(HTTP_ACCESS_TEXT_WRITER));
          (HTTPAccessLogPublisher) getStartupTextHTTPAccessPublisher(HTTP_ACCESS_TEXT_WRITER));
      // Enable more verbose error logger.
      ErrorLogger.getInstance().addLogPublisher(
            (ErrorLogPublisher) TextErrorLogPublisher.getToolStartupTextErrorPublisher(ERROR_TEXT_WRITER));
          (ErrorLogPublisher) getToolStartupTextErrorPublisher(ERROR_TEXT_WRITER));
      DebugLogger.getInstance().addPublisherIfRequired(DEBUG_TEXT_WRITER);
@@ -585,9 +582,9 @@
  private static void clearJEBackends() throws Exception
  {
    for (Backend backend: DirectoryServer.getBackends().values()) {
    for (Backend<?> backend : DirectoryServer.getBackends().values()) {
      if (backend instanceof BackendImpl) {
        TestCaseUtils.clearJEBackend(false, backend.getBackendID(), null);
        clearJEBackend(backend.getBackendID());
      }
    }
  }
@@ -603,8 +600,7 @@
    if (testConfigDir == null) {
      throw new RuntimeException("The testConfigDir variable is not set yet!");
    }
    return (testConfigDir);
    return testConfigDir;
  }
  public static File getBuildRoot()
@@ -854,34 +850,38 @@
   */
  public static void clearMemoryBackend(String backendID) throws Exception
  {
    MemoryBackend memoryBackend =
      (MemoryBackend) DirectoryServer.getBackend(backendID);
    MemoryBackend memoryBackend = (MemoryBackend) DirectoryServer.getBackend(backendID);
    // FIXME JNR I suspect we could call finalizeBackend() here (but also in other
    // places in this class), because finalizeBackend() calls clearMemoryBackend().
    if (memoryBackend != null)
    {
      memoryBackend.clearMemoryBackend();
    }
  }
  /**
   * Clears all the entries from the JE backend determined by the
   * be id passed into the method.
   * Clears all the entries from the JE backend determined by the backend id passed into the method.
   *
   * @throws Exception If an unexpected problem occurs.
   */
  public static void clearJEBackend(String backendId) throws Exception
  {
    clearJEBackend(backendId, null);
  }
   * @param  createBaseEntry  Indicate whether to automatically create the base
   *                          entry and add it to the backend.
  /**
   * Clears all the entries from the JE backend determined by the backend id passed into the method.
   *
   * @param beID  The be id to clear.
   *
   * @param dn   The suffix of the backend to create if the the createBaseEntry
   *             boolean is true.
   *
   * @param backendId  The backend id to clear
   * @param baseDN   If not null, the suffix of the backend to create
   * @throws  Exception  If an unexpected problem occurs.
   */
  public static void clearJEBackend(boolean createBaseEntry, String beID, String dn)
       throws Exception
  public static void clearJEBackend(String backendId, String baseDN) throws Exception
  {
    BackendImpl backend = (BackendImpl)DirectoryServer.getBackend(beID);
    RootContainer rootContainer = backend.getRootContainer();
    if (rootContainer != null) {
    final BackendImpl backend = (BackendImpl)DirectoryServer.getBackend(backendId);
    final RootContainer rootContainer = backend.getRootContainer();
    if (rootContainer != null)
    {
      for (EntryContainer ec : rootContainer.getEntryContainers())
      {
        ec.clear();
@@ -889,12 +889,10 @@
      }
      rootContainer.resetNextEntryID();
      if (createBaseEntry)
      if (baseDN != null)
      {
        DN baseDN = DN.valueOf(dn);
        Entry e = createEntry(baseDN);
        backend = (BackendImpl)DirectoryServer.getBackend(beID);
        backend.addEntry(e, null);
        Entry e = createEntry(DN.valueOf(baseDN));
        DirectoryServer.getBackend(backendId).addEntry(e, null);
      }
    }
  }
@@ -919,7 +917,7 @@
          if (dbContainer instanceof Index) {
            Index index = (Index)dbContainer;
            if (!index.isTrusted()) {
              originalSystemErr.println("ERROR:  The index " + index.toString() + " is no longer trusted.");
              originalSystemErr.println("ERROR:  The index " + index + " is no longer trusted.");
            }
          }
        }
@@ -1531,27 +1529,27 @@
  // ---------------------------------------------------------------------------
  /** The set of loggers for which the console logger has been disabled. */
  private final static Map<Logger, Handler> disabledLogHandlers = new HashMap<Logger,Handler>();
  private static final Map<Logger, Handler> disabledLogHandlers = new HashMap<Logger,Handler>();
  /** The original System.err print stream.  Use this if you absolutely
   *  must write something to System.err. */
  public final static PrintStream originalSystemErr = System.err;
  public static final PrintStream originalSystemErr = System.err;
  /** The original System.out print stream.  Use this if you absolutely
   *  must write something to System.out. */
  public final static PrintStream originalSystemOut = System.out;
  public static final PrintStream originalSystemOut = System.out;
  /** System.err is redirected to here so that we can only print it out
   *  if a test fails. */
  private final static ByteArrayOutputStream redirectedSystemErr = new ByteArrayOutputStream();
  private static final ByteArrayOutputStream redirectedSystemErr = new ByteArrayOutputStream();
  /** System.out is redirected to here so that we can only print it out
   *  if a test fails. */
  private final static ByteArrayOutputStream redirectedSystemOut = new ByteArrayOutputStream();
  private static final ByteArrayOutputStream redirectedSystemOut = new ByteArrayOutputStream();
  public synchronized static void suppressOutput() {
  public static synchronized void suppressOutput() {
    String suppressStr = System.getProperty("org.opends.test.suppressOutput");
    if ((suppressStr != null) && suppressStr.equalsIgnoreCase("true"))
    if ("true".equalsIgnoreCase(suppressStr))
    {
      System.setOut(new PrintStream(redirectedSystemOut));
      System.setErr(new PrintStream(redirectedSystemErr));
@@ -1583,7 +1581,7 @@
   * @return everything written to System.out since the last time
   * clearSystemOutContents was called.
   */
  public synchronized static String getSystemOutContents() {
  public static synchronized String getSystemOutContents() {
    return redirectedSystemOut.toString();
  }
@@ -1591,30 +1589,30 @@
   * @return everything written to System.err since the last time
   * clearSystemErrContents was called.
   */
  public synchronized static String getSystemErrContents() {
  public static synchronized String getSystemErrContents() {
    return redirectedSystemErr.toString();
  }
  /**
   * clear everything written to System.out since the last time
   * Clear everything written to System.out since the last time
   * clearSystemOutContents was called.
   */
  public synchronized static void clearSystemOutContents() {
  public static synchronized void clearSystemOutContents() {
    redirectedSystemOut.reset();
  }
  /**
   * clear everything written to System.err since the last time
   * Clear everything written to System.err since the last time
   * clearSystemErrContents was called.
   */
  public synchronized static void clearSystemErrContents() {
  public static synchronized void clearSystemErrContents() {
    redirectedSystemErr.reset();
  }
  /**
   * clear everything written to the Access, Error, or Debug loggers
   * Clear everything written to the Access, Error, or Debug loggers.
   */
  public synchronized static void clearLoggersContents() {
  public static synchronized void clearLoggersContents() {
    ACCESS_TEXT_WRITER.clear();
    ERROR_TEXT_WRITER.clear();
    DEBUG_TEXT_WRITER.clear();
@@ -1661,7 +1659,7 @@
    }
  }
  public synchronized static void unsupressOutput() {
  public static synchronized void unsupressOutput() {
    System.setOut(originalSystemOut);
    System.setErr(originalSystemErr);
@@ -1676,16 +1674,14 @@
  /**
   * Read the contents of a file and return it as a String.
   */
  public static String readFile(String name)
          throws IOException {
  public static String readFile(String name) throws IOException {
    return readFile(new File(name));
  }
  /**
   * Read the contents of a file and return it as a String.
   */
  public static String readFile(File file)
          throws IOException {
  public static String readFile(File file) throws IOException {
    byte[] bytes = readFileBytes(file);
    return new String(bytes);
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/authorization/dseecompat/AciTestCase.java
@@ -37,6 +37,7 @@
import javax.naming.directory.ModificationItem;
import org.forgerock.opendj.ldap.ModificationType;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.server.DirectoryServerTestCase;
import org.opends.server.TestCaseUtils;
import org.opends.server.config.ConfigConstants;
@@ -48,7 +49,6 @@
import org.opends.server.tools.LDAPPasswordModify;
import org.opends.server.tools.LDAPSearch;
import org.opends.server.types.*;
import org.forgerock.opendj.ldap.ResultCode;
import org.testng.Assert;
import org.testng.Reporter;
import org.testng.annotations.AfterClass;
@@ -69,7 +69,7 @@
    Reporter.log("Running aciTestCaseSetup");
    TestCaseUtils.startServer();
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.initializeTestBackend(true);
    // Save Global ACI.
@@ -91,7 +91,7 @@
  {
    Reporter.log("Running aciTestCaseTearDown");
    TestCaseUtils.clearJEBackend(false, "userRoot", null);
    TestCaseUtils.clearJEBackend("userRoot");
    TestCaseUtils.initializeTestBackend(true);
    // Restore Global ACI.
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestEntryContainer.java
@@ -26,23 +26,23 @@
 */
package org.opends.server.backends.jeb;
import static org.testng.AssertJUnit.assertTrue;
import java.util.List;
import org.opends.server.TestCaseUtils;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.Entry;
import org.opends.server.types.DN;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeClass;
import org.opends.server.types.Entry;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static org.testng.AssertJUnit.*;
/**
 * EntryContainer tester.
 */
public class TestEntryContainer extends JebTestCase {
  private  String beID="userRoot";
  private static final String backendID = "userRoot";
  private BackendImpl be;
  private static final String ldifString = "dn: dc=example,dc=com\n"
@@ -141,7 +141,7 @@
   */
  @AfterClass
  public void tearDown() throws Exception {
    TestCaseUtils.clearJEBackend(false, beID, "dc=example,dc=com");
    TestCaseUtils.clearJEBackend(backendID);
  }
  /**
@@ -152,8 +152,8 @@
   */
  @Test()
  public void test1() throws Exception {
    TestCaseUtils.clearJEBackend(false, beID, null);
    be=(BackendImpl) DirectoryServer.getBackend(beID);
    TestCaseUtils.clearJEBackend(backendID);
    be = (BackendImpl) DirectoryServer.getBackend(backendID);
    RootContainer rootContainer = be.getRootContainer();
    EntryContainer entryContainer =
        rootContainer.getEntryContainer(DN.valueOf("dc=example,dc=com"));
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestImportJob.java
@@ -299,7 +299,7 @@
  @Test(enabled = true)
  public void testImportAll() throws Exception
  {
    TestCaseUtils.clearJEBackend(false, beID, null);
    TestCaseUtils.clearJEBackend(beID);
    ArrayList<String> fileList = new ArrayList<String>();
    fileList.add(homeDirName + File.separator + "top.ldif");
    fileList.add(homeDirName + File.separator + "entries1.ldif");
@@ -536,7 +536,7 @@
  @Test(dependsOnMethods = "testImportReplaceExisting")
  public void testImportAppend() throws Exception
  {
    TestCaseUtils.clearJEBackend(false, beID, null);
    TestCaseUtils.clearJEBackend(beID);
    LDIFImportConfig importConfig = new LDIFImportConfig(homeDirName
        + File.separator + "top.ldif");
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestRebuildJob.java
@@ -137,7 +137,7 @@
  @AfterClass
  public void cleanUp() throws Exception {
    TestCaseUtils.clearJEBackend(false, beID, suffix);
    TestCaseUtils.clearJEBackend(beID);
    TestCaseUtils.disableBackend(beID);
  }
@@ -147,7 +147,7 @@
   * @throws Exception if the entries are not loaded or created.
   */
  private void cleanAndLoad(int numEntries) throws Exception {
    TestCaseUtils.clearJEBackend(false, beID, suffix);
    TestCaseUtils.clearJEBackend(beID);
    template[2]=numUsersLine;
    template[2]=
        template[2].replaceAll("#numEntries#", String.valueOf(numEntries));
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestVLVIndex.java
@@ -226,7 +226,7 @@
  @AfterClass
  public void cleanUp() throws Exception {
      TestCaseUtils.clearJEBackend(false, beID, "dc=vlvtest,dc=com");
      TestCaseUtils.clearJEBackend(beID);
      TestCaseUtils.disableBackend(beID);
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestVerifyJob.java
@@ -141,17 +141,17 @@
  @AfterClass
  public void cleanUp() throws Exception {
    TestCaseUtils.clearJEBackend(false, beID, suffix);
    TestCaseUtils.clearJEBackend(beID);
    TestCaseUtils.disableBackend(beID);
  }
  /**
   * Performs a ncomplete verify against a backend using the
   * entries loaded in the setup initializer.
   * Performs a complete verify against a backend using the entries loaded in
   * the setup initializer.
   *
   * @throws Exception if error count is not equal to 0.
   * @throws Exception
   *           if error count is not equal to 0.
   */
  @Test()
  public void testCompleteVerifyJob()  throws Exception {
    cleanAndLoad(9);
@@ -850,7 +850,7 @@
   * @throws Exception if the entries are not loaded or created.
   */
  private void cleanAndLoad(int numEntries) throws Exception {
    TestCaseUtils.clearJEBackend(false, beID, suffix);
    TestCaseUtils.clearJEBackend(beID);
    template[2]=numUsersLine;
    template[2]=
         template[2].replaceAll("#numEntries#", String.valueOf(numEntries));
@@ -866,10 +866,11 @@
   */
  private long getStatEntryCount(Entry e, String type)
       throws NumberFormatException {
    AttributeType attrType =
         DirectoryServer.getAttributeType(type);
    AttributeType attrType = DirectoryServer.getAttributeType(type);
    if (attrType == null)
    {
      attrType = DirectoryServer.getDefaultAttributeType(type);
    }
    List<Attribute> attrList = e.getAttribute(attrType, null);
    ByteString v = attrList.get(0).iterator().next();
    return Long.parseLong(v.toString());
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/controls/ServerSideSortControlTestCase.java
@@ -131,7 +131,7 @@
   */
  private void populateDB() throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: uid=albert.zimmerman,dc=example,dc=com",
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/controls/VLVControlTestCase.java
@@ -132,7 +132,7 @@
  private void populateDB()
          throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: uid=albert.zimmerman,dc=example,dc=com",
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/BindOperationTestCase.java
@@ -47,13 +47,14 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import static org.assertj.core.api.Assertions.*;
import static org.opends.server.protocols.internal.InternalClientConnection.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
import static org.opends.server.util.ServerConstants.*;
import static org.testng.Assert.*;
/**
 * A set of test cases for bind operations
 * A set of test cases for bind operations.
 */
public class BindOperationTestCase
       extends OperationTestCase
@@ -202,12 +203,8 @@
    return array;
  }
  /**
   * {@inheritDoc}
   */
  @Override()
  /** {@inheritDoc} */
  @Override
  protected Operation[] createTestOperations()
         throws Exception
  {
@@ -648,7 +645,7 @@
   * Tests the <CODE>getUserEntryDN</CODE> method for a completed bind operation
   * using simple authentication in which this value will be set.
   */
  @Test()
  @Test
  public void testGetUserEntryDNSimpleNonNull()
  {
    InternalClientConnection conn =
@@ -681,7 +678,7 @@
   * Tests the <CODE>getUserEntryDN</CODE> method for a completed bind operation
   * using SASL authentication in which this value will be set.
   */
  @Test()
  @Test
  public void testGetUserEntryDNSASLNonNull()
  {
    InternalClientConnection conn =
@@ -703,7 +700,7 @@
   * <CODE>getProcessingStopTime</CODE>, and <CODE>getProcessingTime()</CODE>
   * methods for a completed bind operation using simple authentication.
   */
  @Test()
  @Test
  public void testGetProcessingStartAndStopTimesSimple()
  {
    InternalClientConnection conn =
@@ -726,7 +723,7 @@
   * <CODE>getProcessingStopTime</CODE>, and <CODE>getProcessingTime()</CODE>
   * methods for a completed bind operation using SASL authentication.
   */
  @Test()
  @Test
  public void testGetProcessingStartAndStopTimesSASL()
  {
    InternalClientConnection conn =
@@ -778,7 +775,7 @@
   * Tests a simple bind operation to ensure that all plugin types are invoked
   * as expected.
   */
  @Test()
  @Test
  public void testAllPluginsCalledSimple()
  {
    InvocationCounterPlugin.resetAllCounters();
@@ -804,7 +801,7 @@
   * Tests a SASL bind operation to ensure that all plugin types are invoked
   * as expected.
   */
  @Test()
  @Test
  public void testAllPluginsCalledSASL()
  {
    InvocationCounterPlugin.resetAllCounters();
@@ -964,8 +961,7 @@
    message = r.readMessage();
    while (message != null)
    {
      assertTrue((message.getProtocolOpType() == OP_TYPE_BIND_RESPONSE) ||
                 (message.getProtocolOpType() == OP_TYPE_EXTENDED_RESPONSE));
      assertThat(message.getProtocolOpType()).isIn(OP_TYPE_BIND_RESPONSE, OP_TYPE_EXTENDED_RESPONSE);
      message = r.readMessage();
    }
@@ -1110,8 +1106,7 @@
    message = r.readMessage();
    while (message != null)
    {
      assertTrue((message.getProtocolOpType() == OP_TYPE_BIND_RESPONSE) ||
                 (message.getProtocolOpType() == OP_TYPE_EXTENDED_RESPONSE));
      assertThat(message.getProtocolOpType()).isIn(OP_TYPE_BIND_RESPONSE, OP_TYPE_EXTENDED_RESPONSE);
      message = r.readMessage();
    }
@@ -1261,8 +1256,7 @@
    message = r.readMessage();
    while (message != null)
    {
      assertTrue((message.getProtocolOpType() == OP_TYPE_BIND_RESPONSE) ||
                 (message.getProtocolOpType() == OP_TYPE_EXTENDED_RESPONSE));
      assertThat(message.getProtocolOpType()).isIn(OP_TYPE_BIND_RESPONSE, OP_TYPE_EXTENDED_RESPONSE);
      message = r.readMessage();
    }
@@ -1278,7 +1272,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testBindShortCircuitInPreParseSimpleAnonymous()
         throws Exception
  {
@@ -1310,7 +1304,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testBindShortCircuitInPreOperationSimpleAnonymous()
         throws Exception
  {
@@ -1343,7 +1337,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testBindShortCircuitInPreParseSimpleAuthenticated()
         throws Exception
  {
@@ -1375,7 +1369,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testBindShortCircuitInPreOperationSimpleAuthenticated()
         throws Exception
  {
@@ -1407,7 +1401,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testBindShortCircuitInPreParseSASL()
         throws Exception
  {
@@ -1440,7 +1434,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testBindShortCircuitInPreOperationSASL()
         throws Exception
  {
@@ -1471,7 +1465,7 @@
  /**
   * Tests performing a simple bind operation with an invalid user DN.
   */
  @Test()
  @Test
  public void testSimpleBindInvalidDN()
  {
    InternalClientConnection conn =
@@ -1488,7 +1482,7 @@
  /**
   * Tests performing a SASL bind operation with an invalid user DN.
   */
  @Test()
  @Test
  public void testSASLBindInvalidDN()
  {
    InternalClientConnection conn =
@@ -1509,7 +1503,7 @@
   * Tests performing a simple bind operation with an unsupported control that
   * is marked critical.
   */
  @Test()
  @Test
  public void testSimpleBindUnsupportedCriticalControl()
  {
    InternalClientConnection conn =
@@ -1533,7 +1527,7 @@
   * Tests performing a SASL bind operation with an unsupported control that is
   * marked critical.
   */
  @Test()
  @Test
  public void testSASLBindUnsupportedCriticalControl()
  {
    InternalClientConnection conn =
@@ -1560,7 +1554,7 @@
   * Tests performing a simple bind operation with an unsupported control that
   * is not marked critical.
   */
  @Test()
  @Test
  public void testSimpleBindUnsupportedNonCriticalControl()
  {
    InternalClientConnection conn =
@@ -1584,7 +1578,7 @@
   * Tests performing a SASL bind operation with an unsupported control that is
   * is not marked critical.
   */
  @Test()
  @Test
  public void testSASLBindUnsupportedNonCriticalControl()
  {
    InternalClientConnection conn =
@@ -1612,7 +1606,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSimpleBindNoSuchUser()
         throws Exception
  {
@@ -1636,7 +1630,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSimpleBindWithDNNoPasswordDisallowed()
         throws Exception
  {
@@ -1661,7 +1655,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSimpleBindWithDNNoPasswordAllowed()
         throws Exception
  {
@@ -1698,7 +1692,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSimpleBindNoUserPassword()
         throws Exception
  {
@@ -1729,11 +1723,10 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  public void testSimpleBindReferral()
         throws Exception
  @Test
  public void testSimpleBindReferral() throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntry(
         "dn: ou=people,dc=example,dc=com",
@@ -1763,7 +1756,7 @@
   * Tests performing a simple bind operation with a valid DN but incorrect
   * password.
   */
  @Test()
  @Test
  public void testSimpleBindWrongPassword()
  {
    InternalClientConnection conn =
@@ -1780,7 +1773,7 @@
  /**
   * Tests the behavior of the returnBindErrorMessage configuration option.
   */
  @Test()
  @Test
  public void testReturnBindErrorMessage()
  {
    // Make sure that the default behavior is to not include the error message.
@@ -1791,9 +1784,7 @@
         conn.processSimpleBind(ByteString.valueOf("cn=Directory Manager"),
                                ByteString.valueOf("wrongpassword"));
    assertEquals(bindOperation.getResultCode(), ResultCode.INVALID_CREDENTIALS);
    assertTrue(((bindOperation.getErrorMessage() == null) ||
                (bindOperation.getErrorMessage().length() == 0)),
               bindOperation.getErrorMessage().toString());
    assertThat(bindOperation.getErrorMessage()).isEmpty();
    // Change the server configuration so that error messages should be
@@ -1819,9 +1810,7 @@
         conn.processSimpleBind(ByteString.valueOf("cn=Directory Manager"),
                                ByteString.valueOf("wrongpassword"));
    assertEquals(bindOperation.getResultCode(), ResultCode.INVALID_CREDENTIALS);
    assertTrue(((bindOperation.getErrorMessage() == null) ||
                (bindOperation.getErrorMessage().length() == 0)),
               bindOperation.getErrorMessage().toString());
    assertThat(bindOperation.getErrorMessage()).isEmpty();
  }
@@ -1833,7 +1822,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testRebindClearsAuthInfo()
         throws Exception
  {
@@ -1904,7 +1893,7 @@
         throws Exception
  {
    TestCaseUtils.restartServer();
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: ou=people,dc=example,dc=com",
      "objectClass: organizationalUnit",
@@ -1963,8 +1952,7 @@
    s.close();
    // Cleanup.
    TestCaseUtils.clearJEBackend(false,
       "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
  }
@@ -1981,7 +1969,7 @@
         throws Exception
  {
    TestCaseUtils.restartServer();
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: ou=people,dc=example,dc=com",
      "objectClass: organizationalUnit",
@@ -2050,8 +2038,7 @@
    s.close();
    // Cleanup.
    TestCaseUtils.clearJEBackend(false,
       "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
  }
@@ -2062,7 +2049,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testIgnoreStateUpdateFailurePolicy()
         throws Exception
  {
@@ -2156,7 +2143,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testReactiveStateUpdateFailurePolicy()
         throws Exception
  {
@@ -2251,7 +2238,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testProactiveStateUpdateFailurePolicy()
         throws Exception
  {
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/GroupManagerTestCase.java
@@ -78,14 +78,14 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @BeforeClass()
  @BeforeClass
  public void startServer()
         throws Exception
  {
    TestCaseUtils.startServer();
  }
  @AfterClass()
  @AfterClass
  public void cleanUp() {
    GroupManager groupManager = DirectoryServer.getGroupManager();
    groupManager.deregisterAllGroups();
@@ -97,7 +97,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testGetGroupImplementations()
         throws Exception
  {
@@ -126,7 +126,7 @@
   * @throws Exception If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testStaticGroupCircularNested() throws Exception {
    TestCaseUtils.initializeTestBackend(true);
    GroupManager groupManager = DirectoryServer.getGroupManager();
@@ -170,7 +170,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testStaticGroupDynamicNested() throws Exception {
    TestCaseUtils.initializeTestBackend(true);
    GroupManager groupManager = DirectoryServer.getGroupManager();
@@ -219,7 +219,7 @@
   *
   * @throws Exception If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testStaticGroupInstanceChange() throws Exception {
    TestCaseUtils.initializeTestBackend(true);
    GroupManager groupManager = DirectoryServer.getGroupManager();
@@ -311,7 +311,7 @@
   *
   * @throws Exception If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testStaticGroupInstanceInvalid() throws Exception {
    TestCaseUtils.initializeTestBackend(true);
    GroupManager groupManager = DirectoryServer.getGroupManager();
@@ -357,7 +357,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testStaticGroupNestedAPI() throws Exception {
    TestCaseUtils.initializeTestBackend(true);
    GroupManager groupManager = DirectoryServer.getGroupManager();
@@ -492,7 +492,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testGenericStaticGroupAPI()
         throws Exception
  {
@@ -613,7 +613,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testValidPopulatedGroupOfNames()
         throws Exception
  {
@@ -752,7 +752,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testValidEmptyGroupOfNames()
         throws Exception
  {
@@ -807,7 +807,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testValidPopulatedGroupOfUniqueNames()
         throws Exception
  {
@@ -946,7 +946,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testValidEmptyGroupOfUniqueNames()
         throws Exception
  {
@@ -1001,7 +1001,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testValidPopulatedGroupOfEntries()
         throws Exception
  {
@@ -1140,7 +1140,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testValidEmptyGroupOfEntries()
         throws Exception
  {
@@ -1194,7 +1194,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testRenameStaticGroup()
         throws Exception
  {
@@ -1285,7 +1285,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testStaticClientConnectionMembership()
         throws Exception
  {
@@ -1526,7 +1526,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testStaticMemberList()
         throws Exception
  {
@@ -1666,7 +1666,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testGenericDynamicGroupAPI()
         throws Exception
  {
@@ -1792,7 +1792,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testDynamicGroupMalformedURL()
         throws Exception
  {
@@ -1852,7 +1852,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testGetMembersSimple()
         throws Exception
  {
@@ -1929,7 +1929,7 @@
    {
      DN memberDN = memberList.nextMemberDN();
      assertTrue(memberSet.remove(memberDN),
                 "Returned unexpected member " + memberDN.toString());
                 "Returned unexpected member " + memberDN);
    }
    memberList.close();
    assertTrue(memberSet.isEmpty(),
@@ -1951,7 +1951,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testGetMembersComplex()
         throws Exception
  {
@@ -2029,7 +2029,7 @@
    {
      DN memberDN = memberList.nextMemberDN();
      assertTrue(memberSet.remove(memberDN),
                 "Returned unexpected member " + memberDN.toString());
                 "Returned unexpected member " + memberDN);
    }
    memberList.close();
    assertTrue(memberSet.isEmpty(),
@@ -2051,7 +2051,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testGetMembersMultipleDistinctURLs()
         throws Exception
  {
@@ -2130,7 +2130,7 @@
    {
      DN memberDN = memberList.nextMemberDN();
      assertTrue(memberSet.remove(memberDN),
                 "Returned unexpected member " + memberDN.toString());
                 "Returned unexpected member " + memberDN);
    }
    memberList.close();
    assertTrue(memberSet.isEmpty(),
@@ -2152,12 +2152,12 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testGetMembersMultipleOverlappingURLs()
         throws Exception
  {
    TestCaseUtils.initializeTestBackend(true);
    TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
    GroupManager groupManager = DirectoryServer.getGroupManager();
    groupManager.deregisterAllGroups();
@@ -2235,7 +2235,7 @@
    {
      DN memberDN = memberList.nextMemberDN();
      assertTrue(memberSet.remove(memberDN),
                 "Returned unexpected member " + memberDN.toString());
                 "Returned unexpected member " + memberDN);
    }
    memberList.close();
    assertTrue(memberSet.isEmpty(),
@@ -2254,9 +2254,9 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSubtreeDelete() throws Exception {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    GroupManager groupManager = DirectoryServer.getGroupManager();
    groupManager.deregisterAllGroups();
    addSubtreeGroupTestEntries();
@@ -2305,8 +2305,7 @@
    assertNull(group3);
    // Cleanup.
    TestCaseUtils.clearJEBackend(false,
       "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
  }
  /**
@@ -2314,9 +2313,9 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSubtreeModify() throws Exception {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    GroupManager groupManager = DirectoryServer.getGroupManager();
    groupManager.deregisterAllGroups();
    addSubtreeGroupTestEntries();
@@ -2377,8 +2376,7 @@
    assertTrue(conn.isMemberOf(newGroup3, null));
    // Cleanup.
    TestCaseUtils.clearJEBackend(false,
       "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
  }
  /**
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/ModifyOperationTestCase.java
@@ -3695,7 +3695,7 @@
  public void testCompressedSchemaRefresh() throws Exception
  {
    String baseDN = "dc=example,dc=com";
    TestCaseUtils.clearJEBackend(true, "userRoot", baseDN);
    TestCaseUtils.clearJEBackend("userRoot", baseDN);
    TestCaseUtils.addEntry("dn: cn=Test User," + baseDN,
        "objectClass: top", "objectClass: person",
        "objectClass: organizationalPerson", "sn: User", "cn: Test User");
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java
@@ -71,7 +71,7 @@
  public void setUp() throws Exception
  {
    TestCaseUtils.startServer();
    TestCaseUtils.clearJEBackend(true,"userRoot","dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot","dc=example,dc=com");
    DN suffixDN = DN.valueOf(SUFFIX);
    if (!DirectoryServer.entryExists(suffixDN))
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SubentryManagerTestCase.java
@@ -81,7 +81,7 @@
  public void setUp() throws Exception
  {
    TestCaseUtils.startServer();
    TestCaseUtils.clearJEBackend(false, "userRoot", SUFFIX);
    TestCaseUtils.clearJEBackend("userRoot");
    addTestEntries();
  }
@@ -99,7 +99,7 @@
    subentryList = manager.getCollectiveSubentries(testEntry.getName());
    assertThat(subentryList).isEmpty();
    TestCaseUtils.clearJEBackend(false, "userRoot", SUFFIX);
    TestCaseUtils.clearJEBackend("userRoot");
  }
  @BeforeMethod
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SubentryPasswordPolicyTestCase.java
@@ -60,7 +60,7 @@
  public void setUp() throws Exception
  {
    TestCaseUtils.startServer();
    TestCaseUtils.clearJEBackend(false, "userRoot", SUFFIX);
    TestCaseUtils.clearJEBackend("userRoot");
    // Add suffix entry.
    DN suffixDN = DN.valueOf(SUFFIX);
@@ -103,7 +103,7 @@
  @AfterClass
  public void cleanUp() throws Exception
  {
    TestCaseUtils.clearJEBackend(false, "userRoot", SUFFIX);
    TestCaseUtils.clearJEBackend("userRoot");
  }
  /**
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/TestModifyDNOperation.java
@@ -71,7 +71,7 @@
  {
    TestCaseUtils.startServer();
    TestCaseUtils.initializeTestBackend(true);
    TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
    // Add the example.com entry
    TestCaseUtils.addEntry(
@@ -1161,7 +1161,7 @@
    try
    {
      InvocationCounterPlugin.resetAllCounters();
      TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
      TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
      TestCaseUtils.addEntries(
        "dn: ou=People,dc=example,dc=com",
@@ -1234,7 +1234,7 @@
    try
    {
      InvocationCounterPlugin.resetAllCounters();
      TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
      TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
      TestCaseUtils.addEntries(
        "dn: ou=Org 1,dc=example,dc=com",
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/EntryDNVirtualAttributeProviderTestCase.java
@@ -73,7 +73,7 @@
  {
    TestCaseUtils.startServer();
    TestCaseUtils.initializeTestBackend(true);
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    entryDNType = DirectoryServer.getAttributeType("entrydn", false);
    assertNotNull(entryDNType);
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/EntryUUIDVirtualAttributeProviderTestCase.java
@@ -150,7 +150,7 @@
    String uuidString =
         UUID.nameUUIDFromBytes(getBytes("dc=example,dc=com")).toString();
    TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
    Entry e = TestCaseUtils.addEntry(
      "dn: dc=example,dc=com",
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/GoverningStructureRuleVirtualAttributeProviderTestCase.java
@@ -78,7 +78,7 @@
  {
    TestCaseUtils.startServer();
    TestCaseUtils.initializeTestBackend(true);
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    governingStructureRuleType =
         DirectoryServer.getAttributeType("governingstructurerule", false);
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/HasSubordinatesVirtualAttributeProviderTestCase.java
@@ -167,7 +167,7 @@
        "postalAddress: Aarika Atpco$59208 Elm Street$Youngstown, HI  57377",
        "description: This is the description for Aarika Atpco.");
    TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
    TestCaseUtils.addEntries(entries);
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/NumSubordinatesVirtualAttributeProviderTestCase.java
@@ -164,7 +164,7 @@
        "postalAddress: Aarika Atpco$59208 Elm Street$Youngstown, HI  57377",
        "description: This is the description for Aarika Atpco.");
    TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
    TestCaseUtils.addEntries(entries);
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/StructuralObjectClassVirtualAttributeProviderTestCase.java
@@ -75,7 +75,7 @@
  {
    TestCaseUtils.startServer();
    TestCaseUtils.initializeTestBackend(true);
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    structuralObjectClassType =
         DirectoryServer.getAttributeType("structuralobjectclass", false);
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProviderTestCase.java
@@ -74,7 +74,7 @@
  {
    TestCaseUtils.startServer();
    TestCaseUtils.initializeTestBackend(true);
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    subschemaSubentryType =
         DirectoryServer.getAttributeType("subschemasubentry", false);
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/plugins/ReferentialIntegrityPluginTestCase.java
@@ -826,7 +826,7 @@
    replaceAttrEntry(configDN, dsConfigUpdateInterval,"0 seconds");
    TestCaseUtils.initializeTestBackend(true);
    addTestEntries("o=test");
    TestCaseUtils.clearJEBackend(true,"userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    addTestEntries("dc=example,dc=com");
  }
@@ -846,7 +846,7 @@
    //unit tests.
    replaceAttrEntry(configDN, dsConfigAttrType,"seeAlso");
    replaceAttrEntry(configDN, dsConfigUpdateInterval,"0 seconds");
    TestCaseUtils.clearJEBackend(false,"userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
  }
  /**
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/plugins/UniqueAttributePluginTestCase.java
@@ -72,7 +72,7 @@
    //Add entries to two backends to test public naming context.
    addTestEntries("o=test", 't');
    TestCaseUtils.clearJEBackend(true,"userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    addTestEntries("dc=example,dc=com", 'x');
    uidConfigDN=DN.valueOf("cn=UID Unique Attribute ,cn=Plugins,cn=config");
    testConfigDN=DN.valueOf("cn=Test Unique Attribute,cn=Plugins,cn=config");
@@ -103,7 +103,7 @@
  @AfterClass
  public void tearDown() throws Exception {
    clearConfigEntries();
    TestCaseUtils.clearJEBackend(false,"userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot");
    clearAcis("o=test");
    TestCaseUtils.clearMemoryBackend(TestCaseUtils.TEST_BACKEND_ID);
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
@@ -139,7 +139,7 @@
    // (like the test backend we use in every tests): backend is disabled then
    // re-enabled and this clears the backend reference and thus the underlying
    // data. So for this particular test, we use a classical backend.
    TestCaseUtils.clearJEBackend(false, "userRoot", EXAMPLE_DN);
    TestCaseUtils.clearJEBackend("userRoot");
    // For most tests, a limited number of entries is enough
    updatedEntries = newLDIFEntries(2);
@@ -511,7 +511,7 @@
    + "ds-cfg-receive-status: true\n"
    + "ds-cfg-window-size: " + WINDOW_SIZE;
    TestCaseUtils.clearJEBackend(false, "userRoot", EXAMPLE_DN);
    TestCaseUtils.clearJEBackend("userRoot");
    addSynchroServerEntry(synchroServerLdif);
@@ -1331,7 +1331,7 @@
    callParanoiaCheck = false;
    super.classCleanUp();
    TestCaseUtils.clearJEBackend(false, "userRoot", EXAMPLE_DN);
    TestCaseUtils.clearJEBackend("userRoot");
    paranoiaCheck();
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ReSyncTest.java
@@ -81,7 +81,7 @@
    // re-enabled and this clears the backend reference and thus the underlying
    // data. So for this particular test, we use a classical backend. Let's
    // clear it and create the root entry
    TestCaseUtils.clearJEBackend(false, "userRoot", EXAMPLE_DN);
    TestCaseUtils.clearJEBackend("userRoot");
    addEntry("dn: dc=example,dc=com\n" + "objectClass: top\n"
        + "objectClass: domain\n");
@@ -240,7 +240,7 @@
    entriesToCleanup.remove(DN.valueOf(EXAMPLE_DN));
    super.classCleanUp();
    TestCaseUtils.clearJEBackend(false, "userRoot", EXAMPLE_DN);
    TestCaseUtils.clearJEBackend("userRoot");
    TestCaseUtils.deleteDirectory(reSyncTempDir);
    paranoiaCheck();
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/FractionalReplicationTest.java
@@ -866,7 +866,7 @@
    // We need a backend with a real configuration in cn=config as at import time
    // the real domain will check for backend existence in cn=config. So we use
    // dc=example,dc=com for this particular test.
    clearJEBackend(false, "userRoot", TEST2_ROOT_DN_STRING);
    clearJEBackend("userRoot");
    try
    {
@@ -1104,7 +1104,7 @@
    // We need a backend with a real configuration in cn=config as at import time
    // the real domain will check for backend existence in cn=config. So we use
    // dc=example,dc=com for this particular test.
    clearJEBackend(false, "userRoot", TEST2_ROOT_DN_STRING);
    clearJEBackend("userRoot");
    try
    {
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/StateMachineTest.java
@@ -692,7 +692,7 @@
    // going into degraded status, we need to send a lot of updates. This makes
    // the memory test backend crash with OutOfMemoryError. So we prefer here
    // a backend backed up with a file
    TestCaseUtils.clearJEBackend(false, "userRoot", EXAMPLE_DN);
    TestCaseUtils.clearJEBackend("userRoot");
  }
  /**
@@ -707,7 +707,7 @@
    callParanoiaCheck = false;
    super.classCleanUp();
    TestCaseUtils.clearJEBackend(false, "userRoot", EXAMPLE_DN);
    TestCaseUtils.clearJEBackend("userRoot");
    paranoiaCheck();
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/CollationMatchingRuleTest.java
@@ -347,7 +347,7 @@
    }
    finally
    {
      TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
      TestCaseUtils.clearJEBackend("userRoot");
    }
  }
@@ -364,7 +364,7 @@
  private void populateEntriesForControl() throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: cn=user1,dc=example,dc=com",
      "objectclass: inetorgperson",
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/StringPrepProfileTestCase.java
@@ -63,7 +63,7 @@
  /** Adds an entry for test. */
  private void addEntry() throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: cn=Jos\u00E9,dc=example,   dc=com",
            "objectClass: person",
@@ -95,7 +95,7 @@
    }
    finally
    {
      TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
      TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    }
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/TimeBasedMatchingRuleTest.java
@@ -133,7 +133,7 @@
    }
    finally
    {
      TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
      TestCaseUtils.clearJEBackend("userRoot");
    }
  }
@@ -158,7 +158,7 @@
    }
    finally
    {
      TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
      TestCaseUtils.clearJEBackend("userRoot");
    }
  }
@@ -184,7 +184,7 @@
    }
    finally
    {
      TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
      TestCaseUtils.clearJEBackend("userRoot");
    }
  }
@@ -209,7 +209,7 @@
    }
    finally
    {
      TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
      TestCaseUtils.clearJEBackend("userRoot");
    }
  }
@@ -238,7 +238,7 @@
    }
    finally
    {
      TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
      TestCaseUtils.clearJEBackend("userRoot");
    }
  }
@@ -436,7 +436,7 @@
    // calendar may fail if the time thread using a stale time.
    long currentTime = TimeThread.getTime();
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: cn=user1,dc=example,dc=com",
      "objectclass: person",
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java
@@ -49,10 +49,10 @@
public class LDAPSearchTestCase
       extends ToolsTestCase
{
  // The path to a file containing an invalid bind password.
  /** The path to a file containing an invalid bind password. */
  private String invalidPasswordFile;
  // The path to a file containing a valid bind password.
  /** The path to a file containing a valid bind password. */
  private String validPasswordFile;
@@ -63,9 +63,8 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @BeforeClass()
  public void startServerAndCreatePasswordFiles()
         throws Exception
  @BeforeClass
  public void startServerAndCreatePasswordFiles() throws Exception
  {
    TestCaseUtils.startServer();
@@ -92,7 +91,6 @@
  @AfterClass
  public void tearDown() throws Exception {
    TestCaseUtils.dsconfig(
            "set-sasl-mechanism-handler-prop",
            "--handler-name", "DIGEST-MD5",
@@ -386,7 +384,7 @@
  /**
   * Tests a simple LDAPv2 search.
   */
  @Test()
  @Test
  public void testSimpleLDAPv2Search()
  {
    String[] args =
@@ -410,7 +408,7 @@
  /**
   * Tests a simple LDAPv3 search.
   */
  @Test()
  @Test
  public void testSimpleLDAPv3Search()
  {
    String[] args =
@@ -434,7 +432,7 @@
  /**
   * Tests a simple search with verbose output.
   */
  @Test()
  @Test
  public void testSimpleVerboseSearch()
  {
    String[] args =
@@ -459,7 +457,7 @@
   * Tests a simple invocation using the "--dry-run" option with a valid argument
   * set.
   */
  @Test()
  @Test
  public void testNoOpSearchValidArguments()
  {
    String[] args =
@@ -485,7 +483,7 @@
   * Tests a simple invocation using the "--dry-run" option with an invalid
   * argument set.
   */
  @Test()
  @Test
  public void testNoOpSearchInvalidArguments()
  {
    String[] args =
@@ -510,7 +508,7 @@
  /**
   * Tests a simple LDAP search over SSL using blind trust.
   */
  @Test()
  @Test
  public void testSimpleSearchSSLBlindTrust()
  {
    String[] args =
@@ -533,7 +531,7 @@
  /**
   * Tests a simple LDAP search over SSL using a trust store.
   */
  @Test()
  @Test
  public void testSimpleSearchSSLTrustStore()
  {
    String trustStorePath = DirectoryServer.getInstanceRoot() + File.separator +
@@ -559,7 +557,7 @@
  /**
   * Tests a simple LDAP search using StartTLS with blind trust.
   */
  @Test()
  @Test
  public void testSimpleSearchStartTLSBlindTrust()
  {
    String[] args =
@@ -582,7 +580,7 @@
  /**
   * Tests a simple LDAP search using StartTLS with a trust store.
   */
  @Test()
  @Test
  public void testSimpleSearchStartTLSTrustStore()
  {
    String trustStorePath = DirectoryServer.getInstanceRoot() + File.separator +
@@ -611,7 +609,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSimpleSearchSSLTrustStoreSASLExternal()
         throws Exception
  {
@@ -658,7 +656,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSimpleSearchSSLTrustStoreSASLExternalValidClientCert()
         throws Exception
  {
@@ -706,7 +704,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSimpleSearchSSLTrustStoreSASLExternalInvalidClientCert()
         throws Exception
  {
@@ -754,7 +752,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSimpleSearchStartTLSTrustStoreSASLExternal()
         throws Exception
  {
@@ -800,7 +798,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testCRAMMD5()
         throws Exception
  {
@@ -843,7 +841,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testDigestMD5()
         throws Exception
  {
@@ -887,7 +885,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testPLAIN()
         throws Exception
  {
@@ -912,7 +910,7 @@
  /**
   * Tests a search with a malformed bind DN.
   */
  @Test()
  @Test
  public void testMalformedBindDN()
  {
    String[] args =
@@ -935,7 +933,7 @@
  /**
   * Tests a search with a nonexistent bind DN.
   */
  @Test()
  @Test
  public void testNonExistentBindDN()
  {
    String[] args =
@@ -958,7 +956,7 @@
  /**
   * Tests a search with an invalid password.
   */
  @Test()
  @Test
  public void testInvalidBindPassword()
  {
    String[] args =
@@ -983,7 +981,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testValidPasswordFromFile()
         throws Exception
  {
@@ -1009,7 +1007,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testInvalidPasswordFromFile()
         throws Exception
  {
@@ -1033,7 +1031,7 @@
  /**
   * Tests a search with a malformed base DN.
   */
  @Test()
  @Test
  public void testMalformedBaseDN()
  {
    String[] args =
@@ -1054,7 +1052,7 @@
  /**
   * Tests a search with a nonexistent base DN.
   */
  @Test()
  @Test
  public void testNonExistentBaseDN()
  {
    String[] args =
@@ -1170,7 +1168,7 @@
  /**
   * Tests with the typesOnly option.
   */
  @Test()
  @Test
  public void testTypesOnly()
         throws Exception
  {
@@ -1195,7 +1193,7 @@
  /**
   * Tests with the reportAuthzID option for an unauthenticated search.
   */
  @Test()
  @Test
  public void testReportAuthzIDUnauthenticated()
         throws Exception
  {
@@ -1220,7 +1218,7 @@
  /**
   * Tests with the reportAuthzID option for an authenticated search.
   */
  @Test()
  @Test
  public void testReportAuthzIDAuthenticated()
         throws Exception
  {
@@ -1247,7 +1245,7 @@
  /**
   * Tests with the usePasswordPolicyControl option for an authenticated search.
   */
  @Test()
  @Test
  public void testUsePasswordPolicyControl()
         throws Exception
  {
@@ -1274,7 +1272,7 @@
  /**
   * Tests with the account usability control for an authenticated search.
   */
  @Test()
  @Test
  public void testAccountUsabilityControl()
         throws Exception
  {
@@ -1302,7 +1300,7 @@
   * Tests with the account usability control with an alternate name for an
   * authenticated search.
   */
  @Test()
  @Test
  public void testAccountUsabilityControlAltName()
         throws Exception
  {
@@ -1329,7 +1327,7 @@
  /**
   * Tests with the LDAP assertion control in which the assertion is true.
   */
  @Test()
  @Test
  public void testLDAPAssertionControlTrue()
         throws Exception
  {
@@ -1356,7 +1354,7 @@
  /**
   * Tests with the LDAP assertion control in which the assertion is false.
   */
  @Test()
  @Test
  public void testLDAPAssertionControlFalse()
         throws Exception
  {
@@ -1383,7 +1381,7 @@
  /**
   * Tests with the LDAP matched values control.
   */
  @Test()
  @Test
  public void testMatchedValuesControl()
         throws Exception
  {
@@ -1413,7 +1411,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSubentriesControl()
         throws Exception
  {
@@ -1476,9 +1474,9 @@
   * Tests the inclusion of multiple arbitrary controls in the request to the
   * server.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testMultipleRequestControls()
         throws Exception
  {
@@ -1506,13 +1504,13 @@
  /**
   * Tests the use of the simple paged results control.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSimplePagedResults()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: cn=device 1,dc=example,dc=com",
@@ -1563,13 +1561,13 @@
   * Tests the use of both the server-side sort control and the simple paged
   * results control.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortWithPagedResults()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: uid=albert.zimmerman,dc=example,dc=com",
@@ -1703,13 +1701,13 @@
  /**
   * Tests the use of the server-side sort control with valid sort criteria.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortValidGivenNameAscending()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: uid=albert.zimmerman,dc=example,dc=com",
@@ -1764,13 +1762,13 @@
  /**
   * Tests the use of the server-side sort control with valid sort criteria.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortValidGivenNameDescending()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: uid=albert.zimmerman,dc=example,dc=com",
@@ -1825,13 +1823,13 @@
  /**
   * Tests the use of the server-side sort control with valid sort criteria.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortValidGivenNameAscendingCaseExactOrderingMatch()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: uid=albert.zimmerman,dc=example,dc=com",
@@ -1886,13 +1884,13 @@
  /**
   * Tests the use of the server-side sort control with valid sort criteria.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortValidSnAscendingGivenNameAscending()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: uid=albert.zimmerman,dc=example,dc=com",
@@ -1947,13 +1945,13 @@
  /**
   * Tests the use of the server-side sort control with valid sort criteria.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortValidSnAscendingGivenNameDescending()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: uid=albert.zimmerman,dc=example,dc=com",
@@ -2008,13 +2006,13 @@
  /**
   * Tests the use of the server-side sort control with an empty sort order.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortEmptySortOrder()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    String[] args =
    {
@@ -2038,13 +2036,13 @@
   * Tests the use of the server-side sort control with a sort order containing
   * a key with no attribute type.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortSortOrderMissingType()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    String[] args =
    {
@@ -2068,13 +2066,13 @@
   * Tests the use of the server-side sort control with a sort order containing
   * a key with a colon but no matching rule.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortSortOrderMissingMatchingRule()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    String[] args =
    {
@@ -2097,13 +2095,13 @@
  /**
   * Tests the use of the server-side sort control with an undefined attribute.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortUndefinedAttribute()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    String[] args =
    {
@@ -2127,13 +2125,13 @@
   * Tests the use of the server-side sort control with an undefined ordering
   * rule.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortUndefinedOrderingRule()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    String[] args =
    {
@@ -2157,7 +2155,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testControlNoValue()
         throws Exception
  {
@@ -2188,13 +2186,13 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testVLVWithoutSort()
         throws Exception
  {
    // Test is supposed to fail in parsing arguments. But we do not
    // want it to fail because there no backend to search in.
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    String[] args =
    {
@@ -2218,13 +2216,13 @@
   * Tests the use of the server-side sort control with both the simple paged
   * results and virtual list view controls.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortWithVLVAndPagedResults()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    String[] args =
    {
@@ -2252,7 +2250,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testVLVInvalidDescriptorNoColons()
         throws Exception
  {
@@ -2281,7 +2279,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testVLVInvalidDescriptorTwoColons()
         throws Exception
  {
@@ -2310,7 +2308,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testVLVInvalidDescriptorThreeColons()
         throws Exception
  {
@@ -2337,13 +2335,13 @@
   * Tests the use of both the server-side sort control and the virtual list
   * view control.
   *
   * @throws  Exception  If an unexpectd problem occurs.
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test()
  @Test
  public void testSortWithVLV()
         throws Exception
  {
    TestCaseUtils.clearJEBackend(true, "userRoot", "dc=example,dc=com");
    TestCaseUtils.clearJEBackend("userRoot", "dc=example,dc=com");
    TestCaseUtils.addEntries(
      "dn: uid=albert.zimmerman,dc=example,dc=com",
@@ -2460,7 +2458,7 @@
  /**
   * Tests the LDAPSearch tool with the "--help" option.
   */
  @Test()
  @Test
  public void testHelp()
  {
    String[] args = { "--help" };
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElementTest.java
@@ -82,7 +82,7 @@
    String backendBaseDNName = "ds-cfg-base-dn";
    // Initialize a backend with a base entry.
    TestCaseUtils.clearJEBackend(true, "userRoot", suffix);
    TestCaseUtils.clearJEBackend("userRoot", suffix);
    // Check that suffix is accessible while suffix2 is not.
    searchEntry(suffix, ResultCode.SUCCESS);
@@ -175,26 +175,26 @@
    try
    {
      TestCaseUtils.clearDataBackends();
      // At this point, the list of subordinate naming context is not defined
      // yet (null): any public backend should be visible. Create a backend
      // with a base entry and check that the test naming context is visible.
      TestCaseUtils.initializeMemoryBackend(backendID1, backend1, true);
      searchPublicNamingContexts(ResultCode.SUCCESS, 1);
      // Create another test backend and check that the new backend is visible
      TestCaseUtils.initializeMemoryBackend(backendID2, backend2, true);
      searchPublicNamingContexts(ResultCode.SUCCESS, 2);
      // Now put in the list of subordinate naming context the backend1 naming context.
      // This white list will prevent the backend2 to be visible.
      TestCaseUtils.dsconfig(
          "set-root-dse-backend-prop",
          "--set", "subordinate-base-dn:" + backend1);
      searchPublicNamingContexts(ResultCode.SUCCESS, 1);
      // === Cleaning
      // Reset the subordinate naming context list.
      // Both naming context should be visible again.
      TestCaseUtils.dsconfig(