From 30f529154749a0c79ce8e965886edff0c615b94e Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 13 Jul 2015 10:38:27 +0000
Subject: [PATCH] Inlined TestCaseUtils.new*() methods (superseded by CollectionUtils methods).

---
 opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationBrokerTest.java |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationBrokerTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationBrokerTest.java
index a19a1c1..ff2cbb4 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationBrokerTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationBrokerTest.java
@@ -39,7 +39,7 @@
 import static java.util.Collections.*;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.opends.server.TestCaseUtils.*;
+import static org.opends.server.util.CollectionUtils.*;
 import static org.testng.Assert.*;
 
 @SuppressWarnings("javadoc")
@@ -75,7 +75,7 @@
   {
     byte z = 0;
     final RSInfo info = new RSInfo(rsServerId, rsServerId + ":1389", 0, z, 0);
-    return new ReplicationServerInfo(info, newSet(dsIds));
+    return new ReplicationServerInfo(info, newHashSet(dsIds));
   }
 
   private Map<Integer, ReplicationServerInfo> newMap(ReplicationServerInfo... infos)
@@ -101,7 +101,7 @@
       Map<Integer, ReplicationServerInfo> rsInfos,
       ReplicationServerInfo rsInfo, Integer... connectedDSs)
   {
-    return assertContainsRSWithDSs(rsInfos, rsInfo, newSet(connectedDSs));
+    return assertContainsRSWithDSs(rsInfos, rsInfo, newHashSet(connectedDSs));
   }
 
   private ReplicationServerInfo assertContainsRSWithDSs(
@@ -187,7 +187,7 @@
   public void topologyShouldContainRSWithoutOtherDS(TopologyCtorToUse toUse)
   {
     final Topology topo = newTopology(toUse,
-        newMap(OTHER_DS), newList(CURRENT_RS.toRSInfo()),
+        newMap(OTHER_DS), newArrayList(CURRENT_RS.toRSInfo()),
         CURRENT_DS.getDsId(), CURRENT_RS.getServerId(), EMPTY_SET, EMPTY_MAP);
     assertInvariants(topo);
     assertThat(topo.rsInfos).hasSize(1);
@@ -199,7 +199,7 @@
   public void topologyShouldContainRSWithAllDSs_buildWithTopologyMsg()
   {
     final Topology topo = newTopology(TopologyCtorToUse.BUILD_WITH_TOPOLOGY_MSG,
-        newMap(CURRENT_DS, OTHER_DS), newList(CURRENT_RS.toRSInfo()),
+        newMap(CURRENT_DS, OTHER_DS), newArrayList(CURRENT_RS.toRSInfo()),
         CURRENT_DS.getDsId(), CURRENT_RS.getServerId(), EMPTY_SET, EMPTY_MAP);
     assertInvariants(topo);
     assertThat(topo.rsInfos).hasSize(1);
@@ -212,7 +212,7 @@
   {
     final Map<Integer, ReplicationServerInfo> previousRSs = newMap(CURRENT_RS);
     final Topology topo = newTopology(toUse,
-        newMap(OTHER_DS), newList(CURRENT_RS.toRSInfo()),
+        newMap(OTHER_DS), newArrayList(CURRENT_RS.toRSInfo()),
         CURRENT_DS.getDsId(), CURRENT_RS.getServerId(), EMPTY_SET, previousRSs);
     assertInvariants(topo);
     assertThat(topo.rsInfos).hasSize(1);
@@ -226,7 +226,7 @@
     final ReplicationServerInfo CURRENT_RS_WITHOUT_DS = rsInfo(CURRENT_RS_ID);
     final Map<Integer, ReplicationServerInfo> previousRSs = newMap(CURRENT_RS_WITHOUT_DS);
     final Topology topo = newTopology(toUse,
-        newMap(OTHER_DS), newList(CURRENT_RS.toRSInfo()),
+        newMap(OTHER_DS), newArrayList(CURRENT_RS.toRSInfo()),
         CURRENT_DS.getDsId(), CURRENT_RS.getServerId(), EMPTY_SET, previousRSs);
     assertInvariants(topo);
     assertThat(topo.rsInfos).hasSize(1);
@@ -239,7 +239,7 @@
   {
     final Map<Integer, ReplicationServerInfo> previousRSs = newMap(CURRENT_RS, MISSING_RS);
     final Topology topo = newTopology(toUse,
-        newMap(OTHER_DS), newList(CURRENT_RS.toRSInfo()),
+        newMap(OTHER_DS), newArrayList(CURRENT_RS.toRSInfo()),
         CURRENT_DS.getDsId(), CURRENT_RS.getServerId(), EMPTY_SET, previousRSs);
     assertInvariants(topo);
     assertThat(topo.rsInfos).hasSize(1);
@@ -250,9 +250,9 @@
   @SuppressWarnings("unchecked")
   public void topologyShouldHaveStampedLocallyConfiguredRSs_buildWithDsRsLists()
   {
-    final Set<String> locallyConfigured = newSet(CURRENT_RS.getServerURL());
+    final Set<String> locallyConfigured = newHashSet(CURRENT_RS.getServerURL());
     final Topology topo = newTopology(TopologyCtorToUse.BUILD_WITH_DS_RS_LISTS,
-        newMap(OTHER_DS), newList(CURRENT_RS.toRSInfo(), ANOTHER_RS.toRSInfo()),
+        newMap(OTHER_DS), newArrayList(CURRENT_RS.toRSInfo(), ANOTHER_RS.toRSInfo()),
         CURRENT_DS.getDsId(), CURRENT_RS.getServerId(), locallyConfigured, EMPTY_MAP);
     assertInvariants(topo);
     assertThat(topo.rsInfos).hasSize(2);
@@ -263,5 +263,4 @@
     assertThat(currentRS.isLocallyConfigured()).isTrue();
     assertThat(anotherRS.isLocallyConfigured()).isFalse();
   }
-
 }

--
Gitblit v1.10.0