From edc595e56216e680d268376e85c7625f2f052b6a Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 09 Jul 2015 08:40:36 +0000
Subject: [PATCH] AutoRefactor'ed Collections

---
 opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java |   23 +++--------------------
 1 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java b/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
index 2072e17..71f815c 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
@@ -26,8 +26,6 @@
  */
 package org.opends.server.admin.client.ldap;
 
-
-
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -36,16 +34,11 @@
 
 import org.opends.server.TestCaseUtils;
 import org.opends.server.admin.AdminTestCase;
-import org.opends.server.admin.DefinitionDecodingException;
 import org.opends.server.admin.PropertyException;
-import org.opends.server.admin.ManagedObjectNotFoundException;
 import org.opends.server.admin.TestCfg;
 import org.opends.server.admin.TestChildCfgClient;
 import org.opends.server.admin.TestChildCfgDefn;
 import org.opends.server.admin.TestParentCfgClient;
-import org.opends.server.admin.client.AuthorizationException;
-import org.opends.server.admin.client.CommunicationException;
-import org.opends.server.admin.client.ConcurrentModificationException;
 import org.opends.server.admin.client.ManagedObject;
 import org.opends.server.admin.client.ManagedObjectDecodingException;
 import org.opends.server.admin.client.ManagementContext;
@@ -56,8 +49,6 @@
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-
-
 /**
  * Test cases for aggregations on the client-side.
  */
@@ -365,13 +356,8 @@
 
 
   /** Retrieve the named test parent managed object. */
-  private TestParentCfgClient getTestParent(ManagementContext context,
-      String name) throws DefinitionDecodingException,
-      ManagedObjectDecodingException, AuthorizationException,
-      ManagedObjectNotFoundException, ConcurrentModificationException,
-      CommunicationException {
-    ManagedObject<RootCfgClient> root = context
-        .getRootConfigurationManagedObject();
+  private TestParentCfgClient getTestParent(ManagementContext context, String name) throws Exception {
+    ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
     return root.getChild(TestCfg.getTestOneToManyParentRelationDefinition(),
         name).getConfiguration();
   }
@@ -383,11 +369,8 @@
     SortedSet<String> values = new TreeSet<>(TestChildCfgDefn
         .getInstance().getAggregationPropertyPropertyDefinition());
     if (expected != null) {
-      for (String value : expected) {
-        values.add(value);
-      }
+      Collections.addAll(values, expected);
     }
     Assert.assertEquals((Object) actual, (Object) values);
   }
-
 }

--
Gitblit v1.10.0