dialogBot.setFilter( "(uid=admin)" );
dialogBot.setReturningAttributes( "objectClass, uid, description" );
dialogBot.clickSearchButton();
browserViewBot.selectEntry( "Searches", "Search Admin" );
SearchResultEditorBot srEditorBot = studioBot.getSearchResultEditorBot( "Search Result Editor" );
srEditorBot.activate();
assertTrue( srEditorBot.isEnabled() );
// assert that description attribute is empty
assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
assertEquals( "", srEditorBot.getContent( 1, 4 ) );
// add description
List<Modification> modifications = new ArrayList<Modification>();
modifications.add( new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, new DefaultClientAttribute(
"description", "The 1st description." ) ) );
ldapServer.getDirectoryService().getAdminSession().modify( new LdapDN( "uid=admin,ou=system" ), modifications );
// refresh the search, using the toolbar icon
srEditorBot.refresh();
SWTUtils.sleep( 1000 );
// assert the description attribute value is displayed now
assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
assertEquals( "The 1st description.", srEditorBot.getContent( 1, 4 ) );
}