ChangeNumber cn2 = new ChangeNumber(TimeThread.getTime(), 123, 45);
AttributeType type = DirectoryServer.getAttributeType("description");
Attribute attr1 = Attributes.create("description", "new value");
Modification mod1 = new Modification(ModificationType.REPLACE, attr1);
List<Modification> mods1 = new ArrayList<Modification>();
mods1.add(mod1);
Attribute attr2 = Attributes.empty("description");
Modification mod2 = new Modification(ModificationType.DELETE, attr2);
List<Modification> mods2 = new ArrayList<Modification>();
mods2.add(mod1);
mods2.add(mod2);
AttributeBuilder builder = new AttributeBuilder(type);
List<Modification> mods3 = new ArrayList<Modification>();
builder.add("string");
builder.add("value");
builder.add("again");
Attribute attr3 = builder.toAttribute();
Modification mod3 = new Modification(ModificationType.ADD, attr3);
mods3.add(mod3);
List<Modification> mods4 = new ArrayList<Modification>();
for (int i = 0; i < 10; i++)
{
Attribute attr = Attributes.create("description", "string"
+ String.valueOf(i));
Modification mod = new Modification(ModificationType.ADD, attr);
mods4.add(mod);
}
Attribute attr5 = Attributes.create("namingcontexts", "o=test");
Modification mod5 = new Modification(ModificationType.REPLACE, attr5);
List<Modification> mods5 = new ArrayList<Modification>();
mods5.add(mod5);
// Entry attributes
Attribute eattr1 = Attributes.create("description", "eav description");