From 5e0a551935151242e4308053617c2f487a60d5f0 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 08 Aug 2016 07:31:26 +0000
Subject: [PATCH] Partial OPENDJ-3106 Migrate Entry

---
 opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
index 1712281..a4a3ba4 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
@@ -648,7 +648,9 @@
     assertEquals(mod.getAttribute(), values3and4);
 
     // check that the entry now contains value1 and value2 and no other values.
-    Attribute resultEntryAttr = entry.getAllAttributes(DESCRIPTION).get(0);
+    Iterable<Attribute> attrs = entry.getAllAttributes(DESCRIPTION);
+    assertThat(attrs).hasSize(1);
+    Attribute resultEntryAttr = attrs.iterator().next();
     assertEquals(resultEntryAttr, values1and2);
 
     Attribute attr = buildSyncHist(DESCRIPTION,
@@ -1357,8 +1359,8 @@
     assertEquals(hist.encodeAndPurge(), attr);
 
     // The entry should have no value
-    List<Attribute> attrs = entry.getAllAttributes(DESCRIPTION);
-    assertEquals(attrs.get(0), Attributes.create(DESCRIPTION, "value2", "value3", "value4"));
+    Iterable<Attribute> attrs = entry.getAllAttributes(DESCRIPTION);
+    assertThat(attrs).containsOnly(Attributes.create(DESCRIPTION, "value2", "value3", "value4"));
   }
 
   /**
@@ -1404,8 +1406,8 @@
     assertEquals(hist.encodeAndPurge(), attr);
 
     // The entry should have no value
-    List<Attribute> attrs = entry.getAllAttributes(DESCRIPTION);
-    assertEquals(attrs.get(0), Attributes.create(DESCRIPTION, "value3", "value4"));
+    Iterable<Attribute> attrs = entry.getAllAttributes(DESCRIPTION);
+    assertThat(attrs).containsOnly(Attributes.create(DESCRIPTION, "value3", "value4"));
   }
 
   /**

--
Gitblit v1.10.0