DirectoryServer.getSubentryManager().getSubentries();
for (SubEntry subentry : rfc3672SubList)
{
if (subentry.getDN().equals(ldapSubentry.getDN()))
{
SubtreeSpecification spec = subentry.getSubTreeSpecification();
assertTrue(spec instanceof RFC3672SubtreeSpecification);
}
}
InternalClientConnection connection =
InternalClientConnection.getRootConnection();
// Add Relative Spec test subentry.
Entry relativeSubentry = TestCaseUtils.makeEntry(
"dn: cn=Relative Subentry," + SUFFIX,
"objectClass: top",
"objectclass: subentry",
"subtreeSpecification: {relativeBase \"ou=Test SubEntry Manager\"}",
"cn: Subentry");
AddOperation addOperation =
connection.processAdd(relativeSubentry.getDN(),
relativeSubentry.getObjectClasses(),
relativeSubentry.getUserAttributes(),
relativeSubentry.getOperationalAttributes());
assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);
assertNotNull(DirectoryServer.getEntry(relativeSubentry.getDN()));
List<SubEntry> relativeSubList =
DirectoryServer.getSubentryManager().getSubentries();
for (SubEntry subentry : relativeSubList)
{
if (subentry.getDN().equals(relativeSubentry.getDN()))
{
SubtreeSpecification spec = subentry.getSubTreeSpecification();
assertTrue(spec instanceof RelativeSubtreeSpecification);
}
}
// Remove Relative Spec test subentry.