InternalClientConnection conn =
InternalClientConnection.getRootConnection();
try
{
InternalSearchOperation searchOperation =
new InternalSearchOperation(conn, InternalClientConnection
.nextOperationID(), InternalClientConnection
.nextMessageID(), null, DN.decode(ruleDN),
SearchScope.BASE_OBJECT,
DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false,
SearchFilter.createFilterFromString("(objectClass=*)"),
null, null);
for (VirtualAttributeRule rule : DirectoryServer
.getVirtualAttributes())
{
if (rule.getAttributeType().equals(descriptionType))
{
UserDefinedVirtualAttributeProvider provider =
(UserDefinedVirtualAttributeProvider) rule.getProvider();
assertFalse(provider.isMultiValued());
assertFalse(provider.isSearchable(rule, searchOperation));
provider.processSearch(rule, searchOperation);
assertEquals(searchOperation.getResultCode(),
ResultCode.UNWILLING_TO_PERFORM);
}
}
}