"objectclass: ds-task-rebuild",
"ds-task-class-name: org.nasutekds.server.tasks.RebuildTask",
"ds-task-rebuild-base-dn: dc=example,dc=com",
"ds-task-rebuild-index: cn");
AddOperation addOperation =
conn.processAdd(taskEntry.getDN(), taskEntry.getObjectClasses(),
taskEntry.getUserAttributes(),
taskEntry.getOperationalAttributes());
if (hasPrivilege)
{
assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);
Task task = getCompletedTask(taskEntry.getDN());
assertNotNull(task);
assertTrue(TaskState.isSuccessful(task.getTaskState()));
}
else
{
assertEquals(addOperation.getResultCode(),
ResultCode.INSUFFICIENT_ACCESS_RIGHTS);
}
}