}
private static void checkValues(Entry entry, String attrName,
Set<String> expectedValues)
{
AttributeValue av = null;
int i=0;
try
{
List<Attribute> attrs = entry.getAttribute(attrName);
Attribute a;
Iterator<Attribute> iat = attrs.iterator();
while ((a=iat.next())!=null)
{
Iterator<AttributeValue> iatv = a.iterator();
while ((av = iatv.next())!=null)
{
String encodedValue = av.toString();
assertTrue(
expectedValues.contains(encodedValue),
"In entry " + entry + " attr <" + attrName + "> equals " +
av + " instead of one of the expected values " + expectedValues);
i++;