/**
   * Retrieves a set of invvalid configuration entries.
   *
   * @throws Exception If an unexpected problem occurs.
   */
  @DataProvider(name = "invalidConfigs")
  public Object[][] getInvalidConfigs() throws Exception {
    List<Entry> entries =
        TestCaseUtils.makeEntries(
            "dn: cn=CRAM-MD5,cn=SASL Mechanisms,cn=config",
            "objectClass: top",
            "objectClass: ds-cfg-sasl-mechanism-handler",
            "objectClass: ds-cfg-cram-md5-sasl-mechanism-handler",
            "cn: CRAM-MD5",
            "ds-cfg-java-class: org.opends.server.extensions." + "CRAMMD5SASLMechanismHandler",
            "ds-cfg-enabled: true",
            "",
            "dn: cn=CRAM-MD5,cn=SASL Mechanisms,cn=config",
            "objectClass: top",
            "objectClass: ds-cfg-sasl-mechanism-handler",
            "objectClass: ds-cfg-cram-md5-sasl-mechanism-handler",
            "cn: CRAM-MD5",
            "ds-cfg-java-class: org.opends.server.extensions." + "CRAMMD5SASLMechanismHandler",
            "ds-cfg-enabled: true",
            "ds-cfg-identity-mapper: not a DN",
            "",
            "dn: cn=CRAM-MD5,cn=SASL Mechanisms,cn=config",
            "objectClass: top",
            "objectClass: ds-cfg-sasl-mechanism-handler",
            "objectClass: ds-cfg-cram-md5-sasl-mechanism-handler",
            "cn: CRAM-MD5",
            "ds-cfg-java-class: org.opends.server.extensions." + "CRAMMD5SASLMechanismHandler",
            "ds-cfg-enabled: true",
            "ds-cfg-identity-mapper: cn=does not exist");

    Object[][] array = new Object[entries.size()][1];
    for (int i = 0; i < array.length; i++) {
      array[i] = new Object[] {entries.get(i)};
    }

    return array;
  }
  /**
   * Retrieves a set of invalid configurations that cannot be used to initialize a password policy.
   *
   * @return A set of invalid configurations that cannot be used to initialize a password policy.
   * @throws Exception If an unexpected problem occurs.
   */
  @DataProvider(name = "invalidConfigs")
  public Object[][] getInvalidConfigurations() throws Exception {
    List<Entry> entries =
        TestCaseUtils.makeEntries(
            "dn: cn=Temp Policy 1," + SUFFIX,
            "objectClass: top",
            "objectClass: pwdPolicy",
            "objectClass: subentry",
            "cn: Temp Policy 1",
            "subtreeSpecification: { base \"ou=people\" }",
            "pwdLockoutDuration: 300",
            "pwdMaxFailure: 3",
            "pwdMustChange: 1",
            "pwdAttribute: userPassword",
            "",
            "dn: cn=Temp Policy 2," + SUFFIX,
            "objectClass: top",
            "objectClass: pwdPolicy",
            "objectClass: subentry",
            "cn: Temp Policy 2",
            "subtreeSpecification: { base \"ou=people\" }",
            "pwdLockoutDuration: 300 seconds",
            "pwdMaxFailure: 3",
            "pwdMustChange: TRUE",
            "pwdAttribute: userPassword",
            "",
            "dn: cn=Temp Policy 3," + SUFFIX,
            "objectClass: top",
            "objectClass: pwdPolicy",
            "objectClass: subentry",
            "cn: Temp Policy 3",
            "subtreeSpecification: { base \"ou=people\" }",
            "pwdLockoutDuration: 300",
            "pwdMaxFailure: 3",
            "pwdMustChange: TRUE",
            "pwdAttribute: noSuchAttribute",
            "",
            "dn: cn=Temp Policy 4," + SUFFIX,
            "objectClass: top",
            "objectClass: pwdPolicy",
            "objectClass: subentry",
            "cn: Temp Policy 4",
            "subtreeSpecification: { base \"ou=people\" }",
            "pwdLockoutDuration: 300",
            "pwdMaxFailure: -3",
            "pwdMustChange: TRUE",
            "pwdAttribute: userPassword",
            "",
            "dn: cn=Temp Policy 5," + SUFFIX,
            "objectClass: top",
            "objectClass: pwdPolicy",
            "objectClass: subentry",
            "cn: Temp Policy 5",
            "subtreeSpecification: { base \"ou=people\" }",
            "pwdLockoutDuration: 2147483648",
            "pwdMaxFailure: 3",
            "pwdMustChange: TRUE",
            "pwdAttribute: userPassword",
            "",
            "dn: cn=Temp Policy 6," + SUFFIX,
            "objectClass: top",
            "objectClass: pwdPolicy",
            "objectClass: pwdValidatorPolicy",
            "objectClass: subentry",
            "cn: Temp Policy 6",
            "subtreeSpecification: { base \"ou=people\" }",
            "pwdLockoutDuration: 300",
            "pwdMaxFailure: 3",
            "pwdMustChange: TRUE",
            "pwdAttribute: userPassword",
            "",
            "dn: cn=Temp Policy 7," + SUFFIX,
            "objectClass: top",
            "objectClass: pwdPolicy",
            "objectClass: pwdValidatorPolicy",
            "objectClass: subentry",
            "cn: Temp Policy 7",
            "subtreeSpecification: { base \"ou=people\" }",
            "pwdLockoutDuration: 300",
            "pwdMaxFailure: 3",
            "pwdMustChange: TRUE",
            "pwdAttribute: userPassword",
            "ds-cfg-password-validator: Not_A_DN",
            "",
            "dn: cn=Temp Policy 8," + SUFFIX,
            "objectClass: top",
            "objectClass: pwdPolicy",
            "objectClass: pwdValidatorPolicy",
            "objectClass: subentry",
            "cn: Temp Policy 8",
            "subtreeSpecification: { base \"ou=people\" }",
            "pwdLockoutDuration: 300",
            "pwdMaxFailure: 3",
            "pwdMustChange: TRUE",
            "pwdAttribute: userPassword",
            "ds-cfg-password-validator: cn=Unique Characters Inexistant,cn=Password Validators,cn=config");

    Object[][] configEntries = new Object[entries.size()][1];
    for (int i = 0; i < configEntries.length; i++) {
      configEntries[i] = new Object[] {entries.get(i)};
    }

    return configEntries;
  }