This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new f52f4ef   In Namespace.addClusters and Properties.addRoles changed 
dataType to Set (#1494)
f52f4ef is described below

commit f52f4ef13e0d111a87319aa74f1c69cc91508fc4
Author: Jai Asher <j...@ccs.neu.edu>
AuthorDate: Wed Apr 4 13:50:38 2018 -0700

     In Namespace.addClusters and Properties.addRoles changed dataType to Set 
(#1494)
    
    * Removed Pulsar Functions from AdminTool
    
    * In Namespace.addClusters and Properties.addRoles changed dataType to Set
    
    * Revert "Removed Pulsar Functions from AdminTool"
    
    This reverts commit e04f4e237e5d68d57829f653381c3590e75a2402.
    
    * Fixed compilation for few Tests
    
    * Converted replication_clusters into a Set
---
 .../org/apache/pulsar/PulsarStandaloneStarter.java |  2 +-
 .../pulsar/broker/admin/impl/NamespacesBase.java   |  8 +++---
 .../apache/pulsar/broker/admin/v1/Namespaces.java  |  2 +-
 .../apache/pulsar/broker/admin/v2/Namespaces.java  |  2 +-
 .../service/nonpersistent/NonPersistentTopic.java  |  2 +-
 .../pulsar/broker/web/PulsarWebResource.java       |  5 ++--
 .../apache/pulsar/broker/SLAMonitoringTest.java    |  3 +-
 .../apache/pulsar/broker/admin/AdminApiTest.java   | 17 ++++++-----
 .../apache/pulsar/broker/admin/AdminApiTest2.java  | 12 ++++----
 .../org/apache/pulsar/broker/admin/AdminTest.java  |  8 +++---
 .../broker/admin/IncrementPartitionsTest.java      |  2 +-
 .../apache/pulsar/broker/admin/NamespacesTest.java | 12 ++++----
 .../pulsar/broker/auth/AuthorizationTest.java      |  2 +-
 .../AntiAffinityNamespaceGroupTest.java            |  8 +++---
 .../loadbalance/ModularLoadManagerImplTest.java    |  2 +-
 .../broker/lookup/http/HttpTopicLookupv2Test.java  |  3 +-
 .../broker/service/BacklogQuotaManagerTest.java    |  3 +-
 .../broker/service/BrokerBkEnsemblesTests.java     |  3 +-
 .../pulsar/broker/service/BrokerTestBase.java      |  3 +-
 .../pulsar/broker/service/PeerReplicatorTest.java  |  4 +--
 .../pulsar/broker/service/ReplicatorTest.java      | 13 +++++----
 .../pulsar/broker/service/ReplicatorTestBase.java  |  6 ++--
 .../api/AuthenticatedProducerConsumerTest.java     | 33 +++++++++++++---------
 .../AuthenticationTlsHostnameVerificationTest.java |  3 +-
 .../api/AuthorizationProducerConsumerTest.java     |  4 +--
 .../pulsar/client/api/BrokerServiceLookupTest.java |  5 ++--
 .../client/api/MessageDispatchThrottlingTest.java  |  4 +--
 .../pulsar/client/api/NonPersistentTopicTest.java  |  4 +--
 .../pulsar/client/api/ProducerConsumerBase.java    |  4 +--
 .../pulsar/client/api/TlsProducerConsumerBase.java |  7 ++---
 .../client/impl/ConsumerConfigurationTest.java     |  2 +-
 .../apache/pulsar/client/impl/RawReaderTest.java   |  2 +-
 .../pulsar/compaction/CompactedTopicTest.java      |  2 +-
 .../apache/pulsar/compaction/CompactionTest.java   |  2 +-
 .../apache/pulsar/compaction/CompactorTest.java    |  2 +-
 .../websocket/proxy/ProxyAuthorizationTest.java    |  2 +-
 .../org/apache/pulsar/client/admin/Namespaces.java |  2 +-
 .../client/admin/internal/NamespacesImpl.java      |  2 +-
 .../pulsar/admin/cli/PulsarAdminToolTest.java      |  6 ++--
 .../org/apache/pulsar/admin/cli/CmdNamespaces.java |  3 +-
 .../org/apache/pulsar/admin/cli/CmdProperties.java |  4 +--
 .../pulsar/common/policies/data/Policies.java      |  4 ++-
 .../pulsar/common/policies/data/PropertyAdmin.java | 12 ++++----
 .../common/policies/data/PoliciesDataTest.java     | 19 +++++--------
 .../ProxyAuthenticatedProducerConsumerTest.java    |  3 +-
 .../proxy/server/ProxyForwardAuthDataTest.java     |  3 +-
 .../proxy/server/ProxyRolesEnforcementTest.java    |  5 +---
 .../server/ProxyWithAuthorizationNegTest.java      |  3 +-
 .../proxy/server/ProxyWithAuthorizationTest.java   |  9 +++---
 .../server/ProxyWithoutServiceDiscoveryTest.java   |  3 +-
 50 files changed, 131 insertions(+), 145 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandaloneStarter.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandaloneStarter.java
index 5114e36..68c307a 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandaloneStarter.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandaloneStarter.java
@@ -230,7 +230,7 @@ public class PulsarStandaloneStarter {
 
             if (!admin.properties().getProperties().contains(property)) {
                 admin.properties().createProperty(property,
-                        new 
PropertyAdmin(Lists.newArrayList(config.getSuperUserRoles()), 
Sets.newHashSet(cluster)));
+                        new 
PropertyAdmin(Sets.newHashSet(config.getSuperUserRoles()), 
Sets.newHashSet(cluster)));
             }
 
             if 
(!admin.namespaces().getNamespaces(property).contains(namespace)) {
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
index 2f2f63e..0fe5fd8 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
@@ -141,7 +141,7 @@ public abstract class NamespacesBase extends AdminResource {
                 if (policies.replication_clusters.size() == 1
                         && 
!policies.replication_clusters.contains(config().getClusterName())) {
                     // the only replication cluster is other cluster, redirect
-                    String replCluster = policies.replication_clusters.get(0);
+                    String replCluster = 
Lists.newArrayList(policies.replication_clusters).get(0);
                     ClusterData replClusterData = 
clustersCache().get(AdminResource.path("clusters", replCluster))
                             .orElseThrow(() -> new 
RestException(Status.NOT_FOUND,
                                     "Cluster " + replCluster + " does not 
exist"));
@@ -242,7 +242,7 @@ public abstract class NamespacesBase extends AdminResource {
                 if (policies.replication_clusters.size() == 1
                         && 
!policies.replication_clusters.contains(config().getClusterName())) {
                     // the only replication cluster is other cluster, redirect
-                    String replCluster = policies.replication_clusters.get(0);
+                    String replCluster = 
Lists.newArrayList(policies.replication_clusters).get(0);
                     ClusterData replClusterData = 
clustersCache().get(AdminResource.path("clusters", replCluster))
                             .orElseThrow(() -> new 
RestException(Status.NOT_FOUND,
                                     "Cluser " + replCluster + " does not 
exist"));
@@ -346,7 +346,7 @@ public abstract class NamespacesBase extends AdminResource {
         }
     }
 
-    protected List<String> internalGetNamespaceReplicationClusters() {
+    protected Set<String> internalGetNamespaceReplicationClusters() {
         if (!namespaceName.isGlobal()) {
             throw new RestException(Status.PRECONDITION_FAILED,
                     "Cannot get the replication clusters for a non-global 
namespace");
@@ -388,7 +388,7 @@ public abstract class NamespacesBase extends AdminResource {
             // Force to read the data s.t. the watch to the cache content is 
setup.
             policiesNode = policiesCache().getWithStat(path(POLICIES, 
namespaceName.toString())).orElseThrow(
                     () -> new RestException(Status.NOT_FOUND, "Namespace " + 
namespaceName + " does not exist"));
-            policiesNode.getKey().replication_clusters = clusterIds;
+            policiesNode.getKey().replication_clusters = replicationClusterSet;
 
             // Write back the new policies into zookeeper
             globalZk().setData(path(POLICIES, namespaceName.toString()),
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java
index eae5559..1a1ad70 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java
@@ -249,7 +249,7 @@ public class Namespaces extends NamespacesBase {
     @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Property or cluster or 
namespace doesn't exist"),
             @ApiResponse(code = 412, message = "Namespace is not global") })
-    public List<String> getNamespaceReplicationClusters(@PathParam("property") 
String property,
+    public Set<String> getNamespaceReplicationClusters(@PathParam("property") 
String property,
             @PathParam("cluster") String cluster, @PathParam("namespace") 
String namespace) {
         validateAdminAccessOnProperty(property);
         validateNamespaceName(property, cluster, namespace);
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Namespaces.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Namespaces.java
index a22baac..bf0b255 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Namespaces.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Namespaces.java
@@ -184,7 +184,7 @@ public class Namespaces extends NamespacesBase {
     @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Property or cluster or 
namespace doesn't exist"),
             @ApiResponse(code = 412, message = "Namespace is not global") })
-    public List<String> getNamespaceReplicationClusters(@PathParam("property") 
String property,
+    public Set<String> getNamespaceReplicationClusters(@PathParam("property") 
String property,
             @PathParam("namespace") String namespace) {
         validateAdminAccessOnProperty(property);
         validateNamespaceName(property, namespace);
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java
index 9eb7ce7..19c4864 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java
@@ -532,7 +532,7 @@ public class NonPersistentTopic implements Topic {
 
         Set<String> configuredClusters;
         if (policies.replication_clusters != null) {
-            configuredClusters = 
Sets.newTreeSet(policies.replication_clusters);
+            configuredClusters = policies.replication_clusters;
         } else {
             configuredClusters = Collections.emptySet();
         }
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
index b6e7481..14779c8 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
@@ -607,7 +607,7 @@ public abstract class PulsarWebResource {
         return validationFuture;
     }
 
-    private static ClusterData getOwnerFromPeerClusterList(PulsarService 
pulsar, List<String> replicationClusters) {
+    private static ClusterData getOwnerFromPeerClusterList(PulsarService 
pulsar, Set<String> replicationClusters) {
         String currentCluster = pulsar.getConfiguration().getClusterName();
         if (replicationClusters == null || replicationClusters.isEmpty() || 
isBlank(currentCluster)) {
             return null;
@@ -619,9 +619,8 @@ public abstract class PulsarWebResource {
             if (!cluster.isPresent() || cluster.get().getPeerClusterNames() == 
null) {
                 return null;
             }
-            Set<String> replicationClusterSet = 
Sets.newHashSet(replicationClusters);
             for (String peerCluster : cluster.get().getPeerClusterNames()) {
-                if (replicationClusterSet.contains(peerCluster)) {
+                if (replicationClusters.contains(peerCluster)) {
                     return 
pulsar.getConfigurationCache().clustersCache().get(path("clusters", 
peerCluster))
                             .orElseThrow(() -> new 
RestException(Status.NOT_FOUND,
                                     "Peer cluster " + peerCluster + " data not 
found"));
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/SLAMonitoringTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/SLAMonitoringTest.java
index 81da3e0..d607125 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/SLAMonitoringTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/SLAMonitoringTest.java
@@ -25,7 +25,6 @@ import static org.testng.Assert.fail;
 
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -118,7 +117,7 @@ public class SLAMonitoringTest {
         allowedClusters.add("my-cluster");
         PropertyAdmin adminConfig = new PropertyAdmin();
         adminConfig.setAllowedClusters(allowedClusters);
-        List<String> adminRoles = new ArrayList<>();
+        Set<String> adminRoles = new HashSet<>();
         adminRoles.add("");
         adminConfig.setAdminRoles(adminRoles);
         pulsarAdmin.properties().createProperty("sla-monitor", adminConfig);
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java
index 426a04c..cb18e80 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java
@@ -35,7 +35,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
-import java.util.concurrent.Callable;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -44,7 +43,6 @@ import java.util.concurrent.TimeUnit;
 import javax.ws.rs.client.InvocationCallback;
 import javax.ws.rs.client.WebTarget;
 
-import lombok.extern.slf4j.Slf4j;
 import org.apache.pulsar.broker.PulsarServerException;
 import org.apache.pulsar.broker.PulsarService;
 import org.apache.pulsar.broker.ServiceConfiguration;
@@ -61,7 +59,6 @@ import 
org.apache.pulsar.client.admin.PulsarAdminException.PreconditionFailedExc
 import org.apache.pulsar.client.admin.internal.LookupImpl;
 import org.apache.pulsar.client.admin.internal.PersistentTopicsImpl;
 import org.apache.pulsar.client.admin.internal.PropertiesImpl;
-import org.apache.pulsar.client.api.ClientConfiguration;
 import org.apache.pulsar.client.api.Consumer;
 import org.apache.pulsar.client.api.ConsumerBuilder;
 import org.apache.pulsar.client.api.Message;
@@ -111,6 +108,8 @@ import com.google.common.collect.Range;
 import com.google.common.collect.Sets;
 import com.google.common.hash.Hashing;
 
+import lombok.extern.slf4j.Slf4j;
+
 @Slf4j
 public class AdminApiTest extends MockedPulsarServiceBaseTest {
 
@@ -152,7 +151,7 @@ public class AdminApiTest extends 
MockedPulsarServiceBaseTest {
 
         // Setup namespaces
         admin.clusters().createCluster("use", new 
ClusterData("http://127.0.0.1"; + ":" + BROKER_WEBSERVICE_PORT));
-        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role1", "role2"), Sets.newHashSet("use"));
+        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role1", "role2"), Sets.newHashSet("use"));
         admin.properties().createProperty("prop-xyz", propertyAdmin);
         admin.namespaces().createNamespace("prop-xyz/use/ns1");
     }
@@ -555,14 +554,14 @@ public class AdminApiTest extends 
MockedPulsarServiceBaseTest {
     @Test(enabled = true)
     public void properties() throws PulsarAdminException {
         Set<String> allowedClusters = Sets.newHashSet("use");
-        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role1", "role2"), allowedClusters);
+        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role1", "role2"), allowedClusters);
         admin.properties().updateProperty("prop-xyz", propertyAdmin);
 
         assertEquals(admin.properties().getProperties(), 
Lists.newArrayList("prop-xyz"));
 
         assertEquals(admin.properties().getPropertyAdmin("prop-xyz"), 
propertyAdmin);
 
-        PropertyAdmin newPropertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role3", "role4"), allowedClusters);
+        PropertyAdmin newPropertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role3", "role4"), allowedClusters);
         admin.properties().updateProperty("prop-xyz", newPropertyAdmin);
 
         assertEquals(admin.properties().getPropertyAdmin("prop-xyz"), 
newPropertyAdmin);
@@ -583,7 +582,7 @@ public class AdminApiTest extends 
MockedPulsarServiceBaseTest {
     @Test(invocationCount = 1)
     public void namespaces() throws PulsarAdminException, 
PulsarServerException, Exception {
         admin.clusters().createCluster("usw", new ClusterData());
-        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role1", "role2"),
+        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role1", "role2"),
                 Sets.newHashSet("use", "usw"));
         admin.properties().updateProperty("prop-xyz", propertyAdmin);
 
@@ -1615,7 +1614,7 @@ public class AdminApiTest extends 
MockedPulsarServiceBaseTest {
             public int newProperty;
         }
 
-        PropertyAdmin pa = new PropertyAdmin(Lists.newArrayList("test_appid1", 
"test_appid2"), Sets.newHashSet("use"));
+        PropertyAdmin pa = new PropertyAdmin(Sets.newHashSet("test_appid1", 
"test_appid2"), Sets.newHashSet("use"));
         CustomPropertyAdmin cpa = new CustomPropertyAdmin();
         cpa.setAdminRoles(pa.getAdminRoles());
         cpa.setAllowedClusters(pa.getAllowedClusters());
@@ -1877,7 +1876,7 @@ public class AdminApiTest extends 
MockedPulsarServiceBaseTest {
     @Test
     public void testTopicBundleRangeLookup() throws PulsarAdminException, 
PulsarServerException, Exception {
         admin.clusters().createCluster("usw", new ClusterData());
-        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role1", "role2"),
+        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role1", "role2"),
                 Sets.newHashSet("use", "usw"));
         admin.properties().updateProperty("prop-xyz", propertyAdmin);
         admin.namespaces().createNamespace("prop-xyz/use/getBundleNs", 100);
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java
index 44b7bf6..e907622 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java
@@ -88,7 +88,7 @@ public class AdminApiTest2 extends 
MockedPulsarServiceBaseTest {
 
         // Setup namespaces
         admin.clusters().createCluster("use", new 
ClusterData("http://127.0.0.1"; + ":" + BROKER_WEBSERVICE_PORT));
-        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role1", "role2"), Sets.newHashSet("use"));
+        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role1", "role2"), Sets.newHashSet("use"));
         admin.properties().createProperty("prop-xyz", propertyAdmin);
         admin.namespaces().createNamespace("prop-xyz/use/ns1");
     }
@@ -599,7 +599,7 @@ public class AdminApiTest2 extends 
MockedPulsarServiceBaseTest {
         final String property = "peer-prop";
         Set<String> allowedClusters = Sets.newHashSet("us-west1", "us-west2", 
"us-west3", "us-west4", "us-east1",
                 "us-east2");
-        PropertyAdmin propConfig = new 
PropertyAdmin(Lists.newArrayList("test"), allowedClusters);
+        PropertyAdmin propConfig = new PropertyAdmin(Sets.newHashSet("test"), 
allowedClusters);
         admin.properties().createProperty(property, propConfig);
 
         final String namespace = property + "/global/conflictPeer";
@@ -611,11 +611,11 @@ public class AdminApiTest2 extends 
MockedPulsarServiceBaseTest {
                 Lists.newArrayList("us-west2", "us-west3"));
 
         // (1) no conflicting peer
-        List<String> clusterIds = Lists.newArrayList("us-east1", "us-east2");
+        Set<String> clusterIds = Sets.newHashSet("us-east1", "us-east2");
         admin.namespaces().setNamespaceReplicationClusters(namespace, 
clusterIds);
 
         // (2) conflicting peer
-        clusterIds = Lists.newArrayList("us-west2", "us-west3", "us-west1");
+        clusterIds = Sets.newHashSet("us-west2", "us-west3", "us-west1");
         try {
             admin.namespaces().setNamespaceReplicationClusters(namespace, 
clusterIds);
             fail("Peer-cluster can't coexist in replication cluster list");
@@ -623,11 +623,11 @@ public class AdminApiTest2 extends 
MockedPulsarServiceBaseTest {
             // Ok
         }
 
-        clusterIds = Lists.newArrayList("us-west2", "us-west3");
+        clusterIds = Sets.newHashSet("us-west2", "us-west3");
         // no peer coexist in replication clusters
         admin.namespaces().setNamespaceReplicationClusters(namespace, 
clusterIds);
 
-        clusterIds = Lists.newArrayList("us-west1", "us-west4");
+        clusterIds = Sets.newHashSet("us-west1", "us-west4");
         // no peer coexist in replication clusters
         admin.namespaces().setNamespaceReplicationClusters(namespace, 
clusterIds);
     }
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
index 953fa68..89f49f0 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
@@ -52,9 +52,9 @@ import org.apache.bookkeeper.util.ZkUtils;
 import org.apache.pulsar.broker.admin.v1.BrokerStats;
 import org.apache.pulsar.broker.admin.v1.Brokers;
 import org.apache.pulsar.broker.admin.v1.Clusters;
-import org.apache.pulsar.broker.admin.v1.Properties;
 import org.apache.pulsar.broker.admin.v1.Namespaces;
 import org.apache.pulsar.broker.admin.v1.PersistentTopics;
+import org.apache.pulsar.broker.admin.v1.Properties;
 import org.apache.pulsar.broker.admin.v1.ResourceQuotas;
 import org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest;
 import org.apache.pulsar.broker.cache.ConfigurationCacheService;
@@ -358,7 +358,7 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
         verify(properties, times(1)).validateSuperUserAccess();
 
         Set<String> allowedClusters = Sets.newHashSet();
-        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role1", "role2"), allowedClusters);
+        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role1", "role2"), allowedClusters);
         properties.createProperty("test-property", propertyAdmin);
         verify(properties, times(2)).validateSuperUserAccess();
 
@@ -368,7 +368,7 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
         assertEquals(properties.getPropertyAdmin("test-property"), 
propertyAdmin);
         verify(properties, times(4)).validateSuperUserAccess();
 
-        PropertyAdmin newPropertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role1", "other-role"), allowedClusters);
+        PropertyAdmin newPropertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role1", "other-role"), allowedClusters);
         properties.updateProperty("test-property", newPropertyAdmin);
         verify(properties, times(5)).validateSuperUserAccess();
 
@@ -466,7 +466,7 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
 
         // Create a namespace to test deleting a non-empty property
         clusters.createCluster("use", new ClusterData());
-        newPropertyAdmin = new PropertyAdmin(Lists.newArrayList("role1", 
"other-role"), Sets.newHashSet("use"));
+        newPropertyAdmin = new PropertyAdmin(Sets.newHashSet("role1", 
"other-role"), Sets.newHashSet("use"));
         properties.createProperty("my-property", newPropertyAdmin);
 
         namespaces.createNamespace("my-property", "use", "my-namespace", new 
BundlesData());
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/IncrementPartitionsTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/IncrementPartitionsTest.java
index 60f2044..3ffccfe 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/IncrementPartitionsTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/IncrementPartitionsTest.java
@@ -50,7 +50,7 @@ public class IncrementPartitionsTest extends 
MockedPulsarServiceBaseTest {
 
         // Setup namespaces
         admin.clusters().createCluster("use", new 
ClusterData("http://127.0.0.1"; + ":" + BROKER_WEBSERVICE_PORT));
-        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role1", "role2"), Sets.newHashSet("use"));
+        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role1", "role2"), Sets.newHashSet("use"));
         admin.properties().createProperty("prop-xyz", propertyAdmin);
         admin.namespaces().createNamespace("prop-xyz/use/ns1");
     }
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java
index 0fc54b1..374797b 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java
@@ -57,10 +57,10 @@ import org.apache.pulsar.broker.web.PulsarWebResource;
 import org.apache.pulsar.broker.web.RestException;
 import org.apache.pulsar.client.admin.PulsarAdminException;
 import org.apache.pulsar.client.api.Producer;
-import org.apache.pulsar.common.naming.TopicName;
 import org.apache.pulsar.common.naming.NamespaceBundle;
 import org.apache.pulsar.common.naming.NamespaceBundles;
 import org.apache.pulsar.common.naming.NamespaceName;
+import org.apache.pulsar.common.naming.TopicName;
 import org.apache.pulsar.common.policies.data.AuthAction;
 import org.apache.pulsar.common.policies.data.BundlesData;
 import org.apache.pulsar.common.policies.data.ClusterData;
@@ -141,7 +141,7 @@ public class NamespacesTest extends 
MockedPulsarServiceBaseTest {
         admin.clusters().createCluster("usw", new 
ClusterData("http://broker-usw.com:"; + BROKER_WEBSERVICE_PORT));
         admin.clusters().createCluster("usc", new 
ClusterData("http://broker-usc.com:"; + BROKER_WEBSERVICE_PORT));
         admin.properties().createProperty(this.testProperty,
-                new PropertyAdmin(Lists.newArrayList("role1", "role2"), 
Sets.newHashSet("use", "usc", "usw")));
+                new PropertyAdmin(Sets.newHashSet("role1", "role2"), 
Sets.newHashSet("use", "usc", "usw")));
 
         createTestNamespaces(this.testProperty, this.testLocalNamespaces, new 
BundlesData());
         createGlobalTestNamespaces(this.testProperty, 
this.testGlobalNamespaces.get(0).getLocalName(),
@@ -371,7 +371,7 @@ public class NamespacesTest extends 
MockedPulsarServiceBaseTest {
         assertEquals(
                 
namespaces.getNamespaceReplicationClusters(this.testGlobalNamespaces.get(0).getProperty(),
                         this.testGlobalNamespaces.get(0).getCluster(), 
this.testGlobalNamespaces.get(0).getLocalName()),
-                Lists.newArrayList());
+                Sets.newHashSet());
 
         
namespaces.setNamespaceReplicationClusters(this.testGlobalNamespaces.get(0).getProperty(),
                 this.testGlobalNamespaces.get(0).getCluster(), 
this.testGlobalNamespaces.get(0).getLocalName(),
@@ -410,7 +410,7 @@ public class NamespacesTest extends 
MockedPulsarServiceBaseTest {
         }
 
         admin.properties().updateProperty(testProperty,
-                new PropertyAdmin(Lists.newArrayList("role1", "role2"), 
Sets.newHashSet("use", "usc")));
+                new PropertyAdmin(Sets.newHashSet("role1", "role2"), 
Sets.newHashSet("use", "usc")));
 
         try {
             namespaces.setNamespaceReplicationClusters(this.testProperty, 
"global",
@@ -568,7 +568,7 @@ public class NamespacesTest extends 
MockedPulsarServiceBaseTest {
                 }), Mockito.anyBoolean(), Mockito.anyBoolean(), 
Mockito.anyBoolean());
 
         
admin.namespaces().setNamespaceReplicationClusters(testGlobalNamespaces.get(0).toString(),
-                Lists.newArrayList("usw"));
+                Sets.newHashSet("usw"));
 
         uri = URI.create("http://localhost"; + ":" + BROKER_WEBSERVICE_PORT + 
"/admin/namespace/"
                 + this.testLocalNamespaces.get(2).toString() + 
"?authoritative=false");
@@ -987,7 +987,7 @@ public class NamespacesTest extends 
MockedPulsarServiceBaseTest {
             pulsar.getConfiguration().setAuthorizationEnabled(true);
             final String path = PulsarWebResource.path(POLICIES, property);
             final String data = 
ObjectMapperFactory.getThreadLocal().writeValueAsString(
-                    new 
PropertyAdmin(Lists.newArrayList(namespaces.clientAppId()), 
Sets.newHashSet("use")));
+                    new 
PropertyAdmin(Sets.newHashSet(namespaces.clientAppId()), 
Sets.newHashSet("use")));
             
ZkUtils.createFullPathOptimistic(pulsar.getConfigurationCache().getZooKeeper(), 
path, data.getBytes(),
                     ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
             namespaces.validateAdminAccessOnProperty(property);
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/AuthorizationTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/AuthorizationTest.java
index c4375e2..4ed8100 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/AuthorizationTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/AuthorizationTest.java
@@ -66,7 +66,7 @@ public class AuthorizationTest extends 
MockedPulsarServiceBaseTest {
         
assertEquals(auth.canLookup(TopicName.get("persistent://p1/c1/ns1/ds1"), 
"my-role", null), false);
 
         admin.clusters().createCluster("c1", new ClusterData());
-        admin.properties().createProperty("p1", new 
PropertyAdmin(Lists.newArrayList("role1"), Sets.newHashSet("c1")));
+        admin.properties().createProperty("p1", new 
PropertyAdmin(Sets.newHashSet("role1"), Sets.newHashSet("c1")));
         waitForChange();
         admin.namespaces().createNamespace("p1/c1/ns1");
         waitForChange();
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/AntiAffinityNamespaceGroupTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/AntiAffinityNamespaceGroupTest.java
index 319f067..68d00c0 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/AntiAffinityNamespaceGroupTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/AntiAffinityNamespaceGroupTest.java
@@ -217,7 +217,7 @@ public class AntiAffinityNamespaceGroupTest {
 
         pulsar1.getConfiguration().setFailureDomainsEnabled(true);
         admin1.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
 
         for (int i = 0; i < totalNamespaces; i++) {
             final String ns = namespace + i;
@@ -313,7 +313,7 @@ public class AntiAffinityNamespaceGroupTest {
         final String bundle = "/0x00000000_0xffffffff";
 
         admin1.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
 
         for (int i = 0; i < totalNamespaces; i++) {
             final String ns = namespace + i;
@@ -449,7 +449,7 @@ public class AntiAffinityNamespaceGroupTest {
         final String bundle = "/0x00000000_0xffffffff";
 
         admin1.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
 
         for (int i = 0; i < totalNamespaces; i++) {
             final String ns = namespace + i;
@@ -502,7 +502,7 @@ public class AntiAffinityNamespaceGroupTest {
         final String bundle = "0x00000000_0xffffffff";
 
         admin1.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
 
         for (int i = 0; i < totalNamespaces; i++) {
             final String ns = namespace + i;
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/ModularLoadManagerImplTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/ModularLoadManagerImplTest.java
index 5eb5a30..9cb91e0 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/ModularLoadManagerImplTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/ModularLoadManagerImplTest.java
@@ -499,7 +499,7 @@ public class ModularLoadManagerImplTest {
         final String sharedBroker = "broker3";
         admin1.clusters().createCluster(cluster, new ClusterData("http://"; + 
pulsar1.getAdvertisedAddress()));
         admin1.properties().createProperty(property,
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet(cluster)));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet(cluster)));
         admin1.namespaces().createNamespace(property + "/" + cluster + "/" + 
namespace);
 
         // set a new policy
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/lookup/http/HttpTopicLookupv2Test.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/lookup/http/HttpTopicLookupv2Test.java
index 6eefc8f..b6a3af3 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/lookup/http/HttpTopicLookupv2Test.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/lookup/http/HttpTopicLookupv2Test.java
@@ -60,6 +60,7 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
 import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
 
 /**
  * HTTP lookup unit tests.
@@ -183,7 +184,7 @@ public class HttpTopicLookupv2Test {
         doReturn(Optional.of(policies1)).when(policiesCache)
                 .get(AdminResource.path(POLICIES, property, cluster, ns1));
         Policies policies2 = new Policies();
-        policies2.replication_clusters = 
Lists.newArrayList("invalid-localCluster");
+        policies2.replication_clusters = 
Sets.newHashSet("invalid-localCluster");
         doReturn(Optional.of(policies2)).when(policiesCache)
                 .get(AdminResource.path(POLICIES, property, cluster, ns2));
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java
index 712baab..d58c690 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java
@@ -47,7 +47,6 @@ import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 
@@ -95,7 +94,7 @@ public class BacklogQuotaManagerTest {
 
             admin.clusters().createCluster("usc", new 
ClusterData(adminUrl.toString()));
             admin.properties().createProperty("prop",
-                    new PropertyAdmin(Lists.newArrayList("appid1"), 
Sets.newHashSet("usc")));
+                    new PropertyAdmin(Sets.newHashSet("appid1"), 
Sets.newHashSet("usc")));
             admin.namespaces().createNamespace("prop/usc/ns-quota");
             admin.namespaces().createNamespace("prop/usc/quotahold");
             admin.namespaces().createNamespace("prop/usc/quotaholdasync");
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerBkEnsemblesTests.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerBkEnsemblesTests.java
index 85a087a..1eaa187 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerBkEnsemblesTests.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerBkEnsemblesTests.java
@@ -54,7 +54,6 @@ import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 /**
@@ -100,7 +99,7 @@ public class BrokerBkEnsemblesTests {
 
             admin.clusters().createCluster("usc", new 
ClusterData(adminUrl.toString()));
             admin.properties().createProperty("prop",
-                    new PropertyAdmin(Lists.newArrayList("appid1"), 
Sets.newHashSet("usc")));
+                    new PropertyAdmin(Sets.newHashSet("appid1"), 
Sets.newHashSet("usc")));
         } catch (Throwable t) {
             LOG.error("Error setting up broker test", t);
             Assert.fail("Broker test setup failed");
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerTestBase.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerTestBase.java
index fc74b27..fd078fc 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerTestBase.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerTestBase.java
@@ -25,7 +25,6 @@ import org.apache.pulsar.common.policies.data.PropertyAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 /**
@@ -41,7 +40,7 @@ public abstract class BrokerTestBase extends 
MockedPulsarServiceBaseTest {
         super.internalSetup();
         admin.clusters().createCluster("use", new 
ClusterData(brokerUrl.toString()));
         admin.properties().createProperty("prop",
-                new PropertyAdmin(Lists.newArrayList("appid1"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("prop/use/ns-abc");
     }
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PeerReplicatorTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PeerReplicatorTest.java
index d23356e..714b741 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PeerReplicatorTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PeerReplicatorTest.java
@@ -86,8 +86,8 @@ public class PeerReplicatorTest extends ReplicatorTestBase {
         admin1.namespaces().createNamespace(namespace1);
         admin1.namespaces().createNamespace(namespace2);
         // add replication cluster
-        admin1.namespaces().setNamespaceReplicationClusters(namespace1, 
Lists.newArrayList("r1"));
-        admin1.namespaces().setNamespaceReplicationClusters(namespace2, 
Lists.newArrayList("r2"));
+        admin1.namespaces().setNamespaceReplicationClusters(namespace1, 
Sets.newHashSet("r1"));
+        admin1.namespaces().setNamespaceReplicationClusters(namespace2, 
Sets.newHashSet("r2"));
         admin1.clusters().updatePeerClusterNames("r3", null);
         // disable tls as redirection url is prepared according tls 
configuration
         pulsar1.getConfiguration().setTlsEnabled(false);
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java
index 09c807f..ac03dc5 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java
@@ -79,6 +79,7 @@ import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 import org.testng.collections.Lists;
 
+import com.google.common.collect.Sets;
 import com.scurrilous.circe.checksum.Crc32cIntChecksum;
 
 import io.netty.buffer.ByteBuf;
@@ -166,7 +167,7 @@ public class ReplicatorTest extends ReplicatorTestBase {
         Assert.assertNotNull(replicationClients3.get("r2"));
 
         // Case 1: Update the global namespace replication configuration to 
only contains the local cluster itself
-        
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns", 
Lists.newArrayList("r1"));
+        
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns", 
Sets.newHashSet("r1"));
 
         // Wait for config changes to be updated.
         Thread.sleep(1000L);
@@ -180,7 +181,7 @@ public class ReplicatorTest extends ReplicatorTestBase {
         Assert.assertNotNull(replicationClients3.get("r2"));
 
         // Case 2: Update the configuration back
-        
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns", 
Lists.newArrayList("r1", "r2", "r3"));
+        
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns", 
Sets.newHashSet("r1", "r2", "r3"));
 
         // Wait for config changes to be updated.
         Thread.sleep(1000L);
@@ -204,7 +205,7 @@ public class ReplicatorTest extends ReplicatorTestBase {
 
         final String namespace = "pulsar/global/concurrent";
         admin1.namespaces().createNamespace(namespace);
-        admin1.namespaces().setNamespaceReplicationClusters(namespace, 
Lists.newArrayList("r1", "r2"));
+        admin1.namespaces().setNamespaceReplicationClusters(namespace, 
Sets.newHashSet("r1", "r2"));
         final TopicName topicName = 
TopicName.get(String.format("persistent://" + namespace + "/topic-%d", 0));
         PulsarClient client1 = 
PulsarClient.builder().serviceUrl(url1.toString()).statsInterval(0, 
TimeUnit.SECONDS)
                 .build();
@@ -223,7 +224,7 @@ public class ReplicatorTest extends ReplicatorTestBase {
                 .get(pulsar1.getBrokerService());
         replicationClients.put("r3", pulsarClient);
 
-        admin1.namespaces().setNamespaceReplicationClusters(namespace, 
Lists.newArrayList("r1", "r2", "r3"));
+        admin1.namespaces().setNamespaceReplicationClusters(namespace, 
Sets.newHashSet("r1", "r2", "r3"));
         ExecutorService executor = Executors.newFixedThreadPool(5);
         for (int i = 0; i < 5; i++) {
             executor.submit(() -> {
@@ -265,7 +266,7 @@ public class ReplicatorTest extends ReplicatorTestBase {
 
         // Make sure the namespace config update failed
         try {
-            
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns", 
Lists.newArrayList("r1"));
+            
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns", 
Sets.newHashSet("r1"));
             fail("Should have raised exception");
         } catch (PreconditionFailedException pfe) {
             // OK
@@ -887,7 +888,7 @@ public class ReplicatorTest extends ReplicatorTestBase {
         BrokerService brokerService = pulsar1.getBrokerService();
 
         admin1.namespaces().createNamespace(namespace);
-        admin1.namespaces().setNamespaceReplicationClusters(namespace, 
Lists.newArrayList("r1", "r2", "r3"));
+        admin1.namespaces().setNamespaceReplicationClusters(namespace, 
Sets.newHashSet("r1", "r2", "r3"));
 
         if (isPartitionedTopic) {
             
admin1.persistentTopics().createPartitionedTopic(persistentTopicName, 5);
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTestBase.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTestBase.java
index 81c53c5..d69b592 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTestBase.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTestBase.java
@@ -215,11 +215,11 @@ public class ReplicatorTestBase {
 
         admin1.clusters().createCluster("global", new 
ClusterData("http://global:8080";, "https://global:8443";));
         admin1.properties().createProperty("pulsar",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2", 
"appid3"), Sets.newHashSet("r1", "r2", "r3")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2", 
"appid3"), Sets.newHashSet("r1", "r2", "r3")));
         admin1.namespaces().createNamespace("pulsar/global/ns");
-        
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns", 
Lists.newArrayList("r1", "r2", "r3"));
+        
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns", 
Sets.newHashSet("r1", "r2", "r3"));
         admin1.namespaces().createNamespace("pulsar/global/ns1");
-        
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns1", 
Lists.newArrayList("r1", "r2"));
+        
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns1", 
Sets.newHashSet("r1", "r2"));
 
         assertEquals(admin2.clusters().getCluster("r1").getServiceUrl(), 
url1.toString());
         assertEquals(admin2.clusters().getCluster("r2").getServiceUrl(), 
url2.toString());
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticatedProducerConsumerTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticatedProducerConsumerTest.java
index 83aaade..219e703 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticatedProducerConsumerTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticatedProducerConsumerTest.java
@@ -18,8 +18,19 @@
  */
 package org.apache.pulsar.client.api;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+
+import java.net.URI;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+import javax.ws.rs.InternalServerErrorException;
+
 import org.apache.pulsar.broker.authentication.AuthenticationProviderBasic;
 import org.apache.pulsar.broker.authentication.AuthenticationProviderTls;
 import org.apache.pulsar.client.admin.PulsarAdmin;
@@ -37,13 +48,7 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import javax.ws.rs.InternalServerErrorException;
-import java.net.URI;
-import java.util.*;
-import java.util.concurrent.TimeUnit;
-
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.spy;
+import com.google.common.collect.Sets;
 
 public class AuthenticatedProducerConsumerTest extends ProducerConsumerBase {
     private static final Logger log = 
LoggerFactory.getLogger(AuthenticatedProducerConsumerTest.class);
@@ -164,7 +169,7 @@ public class AuthenticatedProducerConsumerTest extends 
ProducerConsumerBase {
         internalSetup(authTls);
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
 
         testSyncProducerAndConsumer(batchMessageDelayMs);
@@ -180,7 +185,7 @@ public class AuthenticatedProducerConsumerTest extends 
ProducerConsumerBase {
         internalSetup(authPassword);
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList(), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet(), Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
 
         testSyncProducerAndConsumer(batchMessageDelayMs);
@@ -196,7 +201,7 @@ public class AuthenticatedProducerConsumerTest extends 
ProducerConsumerBase {
         internalSetup(authPassword);
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList(), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet(), Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
 
         testSyncProducerAndConsumer(batchMessageDelayMs);
@@ -218,7 +223,7 @@ public class AuthenticatedProducerConsumerTest extends 
ProducerConsumerBase {
         admin.clusters().createCluster("use", new 
ClusterData(brokerUrl.toString(), brokerUrlTls.toString(),
                 "pulsar://localhost:" + BROKER_PORT, "pulsar+ssl://localhost:" 
+ BROKER_PORT_TLS));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("anonymousUser"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("anonymousUser"), 
Sets.newHashSet("use")));
 
         // make a PulsarAdmin instance as "anonymousUser" for http request
         admin.close();
@@ -297,7 +302,7 @@ public class AuthenticatedProducerConsumerTest extends 
ProducerConsumerBase {
         admin.clusters().createCluster("use", new 
ClusterData(brokerUrl.toString(), brokerUrlTls.toString(),
                 "pulsar://localhost:" + BROKER_PORT, "pulsar+ssl://localhost:" 
+ BROKER_PORT_TLS));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         String namespace = "my-property/use/my-ns";
         admin.namespaces().createNamespace(namespace);
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticationTlsHostnameVerificationTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticationTlsHostnameVerificationTest.java
index b14ee11..13d5ad2 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticationTlsHostnameVerificationTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticationTlsHostnameVerificationTest.java
@@ -42,7 +42,6 @@ import org.testng.annotations.AfterMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 public class AuthenticationTlsHostnameVerificationTest extends 
ProducerConsumerBase {
@@ -118,7 +117,7 @@ public class AuthenticationTlsHostnameVerificationTest 
extends ProducerConsumerB
                 .build();
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
     }
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthorizationProducerConsumerTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthorizationProducerConsumerTest.java
index 36b91a4..63ac489 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthorizationProducerConsumerTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthorizationProducerConsumerTest.java
@@ -117,7 +117,7 @@ public class AuthorizationProducerConsumerTest extends 
ProducerConsumerBase {
                 .authentication(authenticationInvalidRole).build();
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
 
         // (1) Valid Producer and consumer creation
@@ -166,7 +166,7 @@ public class AuthorizationProducerConsumerTest extends 
ProducerConsumerBase {
         pulsarClient = 
PulsarClient.builder().serviceUrl(lookupUrl).authentication(authentication).build();
 
         admin.properties().createProperty("prop-prefix",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("prop-prefix/use/ns");
 
         // (1) Valid subscription name will be approved by authorization 
service
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
index 57d8b47..d5759f0 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
@@ -97,7 +97,6 @@ import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.google.common.util.concurrent.MoreExecutors;
 
@@ -234,7 +233,7 @@ public class BrokerServiceLookupTest extends 
ProducerConsumerBase {
         admin.clusters().createCluster(newCluster,
                 new ClusterData("http://127.0.0.1:"; + BROKER_WEBSERVICE_PORT, 
null, broker2ServiceUrl, null));
         admin.properties().createProperty(property,
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet(newCluster)));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet(newCluster)));
         admin.namespaces().createNamespace(property + "/" + newCluster + 
"/my-ns");
 
         PulsarService pulsar2 = startBroker(conf2);
@@ -1023,7 +1022,7 @@ public class BrokerServiceLookupTest extends 
ProducerConsumerBase {
         admin.clusters().createCluster(cluster,
                 new ClusterData("http://127.0.0.1:"; + BROKER_WEBSERVICE_PORT, 
null, null, null));
         admin.properties().createProperty(property,
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet(cluster)));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet(cluster)));
         admin.namespaces().createNamespace(property + "/" + cluster + "/" + 
namespace);
         admin.persistentTopics().createPartitionedTopic(dest.toString(), 
totalPartitions);
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MessageDispatchThrottlingTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MessageDispatchThrottlingTest.java
index 59e3439..f9f346f 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MessageDispatchThrottlingTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MessageDispatchThrottlingTest.java
@@ -39,7 +39,7 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Lists;
+import dlshade.com.google.common.collect.Sets;
 
 public class MessageDispatchThrottlingTest extends ProducerConsumerBase {
     private static final Logger log = 
LoggerFactory.getLogger(MessageDispatchThrottlingTest.class);
@@ -653,7 +653,7 @@ public class MessageDispatchThrottlingTest extends 
ProducerConsumerBase {
 
         admin.clusters().createCluster("global", new 
ClusterData("http://global:8080";));
         admin.namespaces().createNamespace(namespace);
-        admin.namespaces().setNamespaceReplicationClusters(namespace, 
Lists.newArrayList("use"));
+        admin.namespaces().setNamespaceReplicationClusters(namespace, 
Sets.newHashSet("use"));
         admin.namespaces().setDispatchRate(namespace, dispatchRate);
 
         // create producer and topic
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonPersistentTopicTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonPersistentTopicTest.java
index 41df9ff..02fe322 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonPersistentTopicTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonPersistentTopicTest.java
@@ -950,10 +950,10 @@ public class NonPersistentTopicTest extends 
ProducerConsumerBase {
 
             admin1.clusters().createCluster("global", new 
ClusterData("http://global:8080";));
             admin1.properties().createProperty("pulsar", new PropertyAdmin(
-                    Lists.newArrayList("appid1", "appid2", "appid3"), 
Sets.newHashSet("r1", "r2", "r3")));
+                    Sets.newHashSet("appid1", "appid2", "appid3"), 
Sets.newHashSet("r1", "r2", "r3")));
             admin1.namespaces().createNamespace("pulsar/global/ns");
             
admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns",
-                    Lists.newArrayList("r1", "r2", "r3"));
+                    Sets.newHashSet("r1", "r2", "r3"));
 
             assertEquals(admin2.clusters().getCluster("r1").getServiceUrl(), 
url1.toString());
             assertEquals(admin2.clusters().getCluster("r2").getServiceUrl(), 
url2.toString());
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ProducerConsumerBase.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ProducerConsumerBase.java
index ed746f8..2960bb3 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ProducerConsumerBase.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ProducerConsumerBase.java
@@ -27,7 +27,6 @@ import org.apache.pulsar.common.policies.data.PropertyAdmin;
 import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 public abstract class ProducerConsumerBase extends MockedPulsarServiceBaseTest 
{
@@ -41,7 +40,7 @@ public abstract class ProducerConsumerBase extends 
MockedPulsarServiceBaseTest {
     public void producerBaseSetup() throws Exception {
         admin.clusters().createCluster("use", new 
ClusterData("http://127.0.0.1:"; + BROKER_WEBSERVICE_PORT));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
     }
 
@@ -54,4 +53,5 @@ public abstract class ProducerConsumerBase extends 
MockedPulsarServiceBaseTest {
         // Make sure that there are no duplicates
         Assert.assertTrue(messagesReceived.add(receivedMessage), "Received 
duplicate message " + receivedMessage);
     }
+    
 }
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/TlsProducerConsumerBase.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/TlsProducerConsumerBase.java
index 6590344..0c85021 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/TlsProducerConsumerBase.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/TlsProducerConsumerBase.java
@@ -20,9 +20,6 @@ package org.apache.pulsar.client.api;
 
 import static org.mockito.Mockito.spy;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -34,6 +31,8 @@ import org.apache.pulsar.common.policies.data.PropertyAdmin;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 
+import com.google.common.collect.Sets;
+
 public class TlsProducerConsumerBase extends ProducerConsumerBase {
     protected final String TLS_TRUST_CERT_FILE_PATH = 
"./src/test/resources/authentication/tls/cacert.pem";
     protected final String TLS_CLIENT_CERT_FILE_PATH = 
"./src/test/resources/authentication/tls/client-cert.pem";
@@ -92,7 +91,7 @@ public class TlsProducerConsumerBase extends 
ProducerConsumerBase {
         admin.clusters().createCluster(clusterName, new 
ClusterData(brokerUrl.toString(), brokerUrlTls.toString(),
                 "pulsar://localhost:" + BROKER_PORT, "pulsar+ssl://localhost:" 
+ BROKER_PORT_TLS));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
     }
 }
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ConsumerConfigurationTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ConsumerConfigurationTest.java
index e070bf9..64212af 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ConsumerConfigurationTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ConsumerConfigurationTest.java
@@ -41,7 +41,7 @@ public class ConsumerConfigurationTest extends 
MockedPulsarServiceBaseTest {
 
         admin.clusters().createCluster("use", new 
ClusterData("http://127.0.0.1:"; + BROKER_WEBSERVICE_PORT));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
     }
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/RawReaderTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/RawReaderTest.java
index e061e3e..990bcae 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/RawReaderTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/RawReaderTest.java
@@ -64,7 +64,7 @@ public class RawReaderTest extends 
MockedPulsarServiceBaseTest {
         admin.clusters().createCluster("use",
                 new ClusterData("http://127.0.0.1:"; + BROKER_WEBSERVICE_PORT));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
     }
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactedTopicTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactedTopicTest.java
index 69d9cfb..3a9a371 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactedTopicTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactedTopicTest.java
@@ -62,7 +62,7 @@ public class CompactedTopicTest extends 
MockedPulsarServiceBaseTest {
         admin.clusters().createCluster("use",
                 new ClusterData("http://127.0.0.1:"; + BROKER_WEBSERVICE_PORT));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
     }
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java
index b2c2bbe..af39e12 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java
@@ -60,7 +60,7 @@ public class CompactionTest extends 
MockedPulsarServiceBaseTest {
 
         admin.clusters().createCluster("use", new 
ClusterData("http://127.0.0.1:"; + BROKER_WEBSERVICE_PORT));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
 
         compactionScheduler = Executors.newSingleThreadScheduledExecutor(
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactorTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactorTest.java
index 59c46ec..84bc395 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactorTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactorTest.java
@@ -64,7 +64,7 @@ public class CompactorTest extends 
MockedPulsarServiceBaseTest {
         admin.clusters().createCluster("use",
                 new ClusterData("http://127.0.0.1:"; + BROKER_WEBSERVICE_PORT));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
 
         compactionScheduler = Executors.newSingleThreadScheduledExecutor(
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/websocket/proxy/ProxyAuthorizationTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/websocket/proxy/ProxyAuthorizationTest.java
index 025ccb2..37c9295 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/websocket/proxy/ProxyAuthorizationTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/websocket/proxy/ProxyAuthorizationTest.java
@@ -82,7 +82,7 @@ public class ProxyAuthorizationTest extends 
MockedPulsarServiceBaseTest {
         
assertEquals(auth.canLookup(TopicName.get("persistent://p1/c1/ns1/ds1"), 
"my-role", null), false);
 
         admin.clusters().createCluster(configClusterName, new ClusterData());
-        admin.properties().createProperty("p1", new 
PropertyAdmin(Lists.newArrayList("role1"), Sets.newHashSet("c1")));
+        admin.properties().createProperty("p1", new 
PropertyAdmin(Sets.newHashSet("role1"), Sets.newHashSet("c1")));
         waitForChange();
         admin.namespaces().createNamespace("p1/c1/ns1");
         waitForChange();
diff --git 
a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Namespaces.java
 
b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Namespaces.java
index 9fa0a53..bc78283 100644
--- 
a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Namespaces.java
+++ 
b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Namespaces.java
@@ -376,7 +376,7 @@ public interface Namespaces {
      * @throws PulsarAdminException
      *             Unexpected error
      */
-    void setNamespaceReplicationClusters(String namespace, List<String> 
clusterIds) throws PulsarAdminException;
+    void setNamespaceReplicationClusters(String namespace, Set<String> 
clusterIds) throws PulsarAdminException;
 
     /**
      * Get the message TTL for a namespace.
diff --git 
a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java
 
b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java
index c24d8e5..f48e81e 100644
--- 
a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java
+++ 
b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java
@@ -193,7 +193,7 @@ public class NamespacesImpl extends BaseResource implements 
Namespaces {
     }
 
     @Override
-    public void setNamespaceReplicationClusters(String namespace, List<String> 
clusterIds) throws PulsarAdminException {
+    public void setNamespaceReplicationClusters(String namespace, Set<String> 
clusterIds) throws PulsarAdminException {
         try {
             NamespaceName ns = NamespaceName.get(namespace);
             WebTarget path = namespacePath(ns, "replication");
diff --git 
a/pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/PulsarAdminToolTest.java
 
b/pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/PulsarAdminToolTest.java
index c5959b8..e70f20b 100644
--- 
a/pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/PulsarAdminToolTest.java
+++ 
b/pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/PulsarAdminToolTest.java
@@ -190,12 +190,12 @@ public class PulsarAdminToolTest {
         properties.run(split("list"));
         verify(mockProperties).getProperties();
 
-        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Lists.newArrayList("role1", "role2"), Sets.newHashSet("use"));
+        PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet("role1", "role2"), Sets.newHashSet("use"));
 
         properties.run(split("create property --admin-roles role1,role2 
--allowed-clusters use"));
         verify(mockProperties).createProperty("property", propertyAdmin);
 
-        propertyAdmin = new PropertyAdmin(Lists.newArrayList("role1", 
"role2"), Sets.newHashSet("usw"));
+        propertyAdmin = new PropertyAdmin(Sets.newHashSet("role1", "role2"), 
Sets.newHashSet("usw"));
 
         properties.run(split("update property --admin-roles role1,role2 
--allowed-clusters usw"));
         verify(mockProperties).updateProperty("property", propertyAdmin);
@@ -247,7 +247,7 @@ public class PulsarAdminToolTest {
 
         namespaces.run(split("set-clusters myprop/clust/ns1 -c use,usw,usc"));
         
verify(mockNamespaces).setNamespaceReplicationClusters("myprop/clust/ns1",
-                Lists.newArrayList("use", "usw", "usc"));
+                Sets.newHashSet("use", "usw", "usc"));
 
         namespaces.run(split("get-clusters myprop/clust/ns1"));
         
verify(mockNamespaces).getNamespaceReplicationClusters("myprop/clust/ns1");
diff --git 
a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
 
b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
index 6d37594..6a2c8f2 100644
--- 
a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
+++ 
b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
@@ -36,6 +36,7 @@ import com.beust.jcommander.ParameterException;
 import com.beust.jcommander.Parameters;
 import com.beust.jcommander.converters.CommaParameterSplitter;
 import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
 
 @Parameters(commandDescription = "Operations about namespaces")
 public class CmdNamespaces extends CmdBase {
@@ -182,7 +183,7 @@ public class CmdNamespaces extends CmdBase {
         void run() throws PulsarAdminException {
             String namespace = validateNamespace(params);
             List<String> clusters = Lists.newArrayList(clusterIds.split(","));
-            admin.namespaces().setNamespaceReplicationClusters(namespace, 
clusters);
+            admin.namespaces().setNamespaceReplicationClusters(namespace, 
Sets.newHashSet(clusters));
         }
     }
 
diff --git 
a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdProperties.java
 
b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdProperties.java
index 68cb2ec..fb6075c 100644
--- 
a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdProperties.java
+++ 
b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdProperties.java
@@ -65,7 +65,7 @@ public class CmdProperties extends CmdBase {
         @Override
         void run() throws PulsarAdminException {
             String property = getOneArgument(params);
-            PropertyAdmin propertyAdmin = new PropertyAdmin(adminRoles, 
Sets.newHashSet(allowedClusters));
+            PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet(adminRoles), Sets.newHashSet(allowedClusters));
             admin.properties().createProperty(property, propertyAdmin);
         }
     }
@@ -86,7 +86,7 @@ public class CmdProperties extends CmdBase {
         @Override
         void run() throws PulsarAdminException {
             String property = getOneArgument(params);
-            PropertyAdmin propertyAdmin = new PropertyAdmin(adminRoles, 
Sets.newHashSet(allowedClusters));
+            PropertyAdmin propertyAdmin = new 
PropertyAdmin(Sets.newHashSet(adminRoles), Sets.newHashSet(allowedClusters));
             admin.properties().updateProperty(property, propertyAdmin);
         }
     }
diff --git 
a/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/Policies.java
 
b/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/Policies.java
index 985a13f..c1d85bd 100644
--- 
a/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/Policies.java
+++ 
b/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/Policies.java
@@ -21,7 +21,9 @@ package org.apache.pulsar.common.policies.data;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Set;
 
+import com.google.common.collect.Sets;
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -29,7 +31,7 @@ import com.google.common.collect.Maps;
 public class Policies {
 
     public final AuthPolicies auth_policies = new AuthPolicies();
-    public List<String> replication_clusters = Lists.newArrayList();
+    public Set<String> replication_clusters = Sets.newHashSet();
     public BundlesData bundles = defaultBundle();
     public Map<BacklogQuota.BacklogQuotaType, BacklogQuota> backlog_quota_map 
= Maps.newHashMap();
     public Map<String, DispatchRate> clusterDispatchRate = Maps.newHashMap();
diff --git 
a/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PropertyAdmin.java
 
b/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PropertyAdmin.java
index f4c69eb..ef82f06 100644
--- 
a/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PropertyAdmin.java
+++ 
b/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PropertyAdmin.java
@@ -18,13 +18,11 @@
  */
 package org.apache.pulsar.common.policies.data;
 
-import java.util.List;
 import java.util.Objects;
 import java.util.Set;
 
 import javax.xml.bind.annotation.XmlRootElement;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 @XmlRootElement
@@ -32,7 +30,7 @@ public class PropertyAdmin {
     /**
      * List of role enabled as admin for this property
      */
-    private List<String> adminRoles;
+    private Set<String> adminRoles;
 
     /**
      * List of clusters this property is restricted on
@@ -40,20 +38,20 @@ public class PropertyAdmin {
     private Set<String> allowedClusters;
 
     public PropertyAdmin() {
-        adminRoles = Lists.newArrayList();
+        adminRoles = Sets.newHashSet();
         allowedClusters = Sets.newHashSet();
     }
 
-    public PropertyAdmin(List<String> adminRoles, Set<String> allowedClusters) 
{
+    public PropertyAdmin(Set<String> adminRoles, Set<String> allowedClusters) {
         this.adminRoles = adminRoles;
         this.allowedClusters = allowedClusters;
     }
 
-    public List<String> getAdminRoles() {
+    public Set<String> getAdminRoles() {
         return adminRoles;
     }
 
-    public void setAdminRoles(List<String> adminRoles) {
+    public void setAdminRoles(Set<String> adminRoles) {
         this.adminRoles = adminRoles;
     }
 
diff --git 
a/pulsar-common/src/test/java/org/apache/pulsar/common/policies/data/PoliciesDataTest.java
 
b/pulsar-common/src/test/java/org/apache/pulsar/common/policies/data/PoliciesDataTest.java
index 40cc94d..848a94a 100644
--- 
a/pulsar-common/src/test/java/org/apache/pulsar/common/policies/data/PoliciesDataTest.java
+++ 
b/pulsar-common/src/test/java/org/apache/pulsar/common/policies/data/PoliciesDataTest.java
@@ -27,18 +27,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonGenerationException;
-
-import org.apache.pulsar.common.policies.data.AuthAction;
-import org.apache.pulsar.common.policies.data.BundlesData;
-import org.apache.pulsar.common.policies.data.Policies;
-import org.apache.pulsar.common.policies.data.PropertyAdmin;
 import org.apache.pulsar.common.util.ObjectMapperFactory;
 import org.testng.annotations.Test;
 
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
@@ -68,13 +63,13 @@ public class PoliciesDataTest {
     @Test
     void propertyAdmin() {
         PropertyAdmin pa1 = new PropertyAdmin();
-        pa1.setAdminRoles(Lists.newArrayList("role1", "role2"));
+        pa1.setAdminRoles(Sets.newHashSet("role1", "role2"));
         pa1.setAllowedClusters(Sets.newHashSet("use", "usw"));
 
-        assertEquals(pa1, new PropertyAdmin(Lists.newArrayList("role1", 
"role2"), Sets.newHashSet("use", "usw")));
+        assertEquals(pa1, new PropertyAdmin(Sets.newHashSet("role1", "role2"), 
Sets.newHashSet("use", "usw")));
         assertTrue(!pa1.equals(new Object()));
         assertTrue(!pa1.equals(new PropertyAdmin()));
-        assertTrue(!pa1.equals(new PropertyAdmin(Lists.newArrayList("role1", 
"role3"), Sets.newHashSet("usc"))));
+        assertTrue(!pa1.equals(new PropertyAdmin(Sets.newHashSet("role1", 
"role3"), Sets.newHashSet("usc"))));
         assertEquals(pa1.getAdminRoles(), Lists.newArrayList("role1", 
"role2"));
     }
 
diff --git 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticatedProducerConsumerTest.java
 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticatedProducerConsumerTest.java
index 2bd5e8f..f069d02 100644
--- 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticatedProducerConsumerTest.java
+++ 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticatedProducerConsumerTest.java
@@ -47,7 +47,6 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 import org.testng.collections.Maps;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 public class ProxyAuthenticatedProducerConsumerTest extends 
ProducerConsumerBase {
@@ -163,7 +162,7 @@ public class ProxyAuthenticatedProducerConsumerTest extends 
ProducerConsumerBase
         admin.clusters().createCluster(configClusterName, new 
ClusterData(brokerUrl.toString(), brokerUrlTls.toString(),
                 "pulsar://localhost:" + BROKER_PORT, "pulsar+ssl://localhost:" 
+ BROKER_PORT_TLS));
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace("my-property/use/my-ns");
 
         Consumer<byte[]> consumer = 
proxyClient.newConsumer().topic("persistent://my-property/use/my-ns/my-topic1")
diff --git 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyForwardAuthDataTest.java
 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyForwardAuthDataTest.java
index 1b63567..fda29b2 100644
--- 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyForwardAuthDataTest.java
+++ 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyForwardAuthDataTest.java
@@ -38,7 +38,6 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 public class ProxyForwardAuthDataTest extends ProducerConsumerBase {
@@ -94,7 +93,7 @@ public class ProxyForwardAuthDataTest extends 
ProducerConsumerBase {
         String proxyAuthParams = "authParam:proxy";
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace(namespaceName);
         admin.namespaces().grantPermissionOnNamespace(namespaceName, "proxy",
                 Sets.newHashSet(AuthAction.consume, AuthAction.produce));
diff --git 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyRolesEnforcementTest.java
 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyRolesEnforcementTest.java
index 10c0bdf..a365666 100644
--- 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyRolesEnforcementTest.java
+++ 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyRolesEnforcementTest.java
@@ -36,20 +36,17 @@ import 
org.apache.pulsar.broker.authentication.AuthenticationProvider;
 import org.apache.pulsar.client.admin.PulsarAdmin;
 import org.apache.pulsar.client.api.Authentication;
 import org.apache.pulsar.client.api.AuthenticationDataProvider;
-import org.apache.pulsar.client.api.Consumer;
 import org.apache.pulsar.client.api.ProducerConsumerBase;
 import org.apache.pulsar.client.api.PulsarClient;
 import org.apache.pulsar.client.api.PulsarClientException;
 import org.apache.pulsar.common.policies.data.AuthAction;
 import org.apache.pulsar.common.policies.data.PropertyAdmin;
-import 
org.apache.pulsar.proxy.server.ProxyRolesEnforcementTest.BasicAuthentication;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 public class ProxyRolesEnforcementTest extends ProducerConsumerBase {
@@ -193,7 +190,7 @@ public class ProxyRolesEnforcementTest extends 
ProducerConsumerBase {
         String proxyAuthParams = "authParam:proxy";
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("use")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("use")));
         admin.namespaces().createNamespace(namespaceName);
 
         admin.namespaces().grantPermissionOnNamespace(namespaceName, "proxy",
diff --git 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithAuthorizationNegTest.java
 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithAuthorizationNegTest.java
index b9f3376..77c396b 100644
--- 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithAuthorizationNegTest.java
+++ 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithAuthorizationNegTest.java
@@ -47,7 +47,6 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 import org.testng.collections.Maps;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 public class ProxyWithAuthorizationNegTest extends ProducerConsumerBase {
@@ -161,7 +160,7 @@ public class ProxyWithAuthorizationNegTest extends 
ProducerConsumerBase {
         String namespaceName = "my-property/proxy-authorization-neg/my-ns";
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization-neg")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization-neg")));
         admin.namespaces().createNamespace(namespaceName);
 
         admin.namespaces().grantPermissionOnNamespace(namespaceName, "Proxy", 
Sets.newHashSet(AuthAction.produce));
diff --git 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithAuthorizationTest.java
 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithAuthorizationTest.java
index 9c95778..1544d53 100644
--- 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithAuthorizationTest.java
+++ 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithAuthorizationTest.java
@@ -50,7 +50,6 @@ import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 import org.testng.collections.Maps;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 public class ProxyWithAuthorizationTest extends ProducerConsumerBase {
@@ -227,7 +226,7 @@ public class ProxyWithAuthorizationTest extends 
ProducerConsumerBase {
         String namespaceName = "my-property/proxy-authorization/my-ns";
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization")));
         admin.namespaces().createNamespace(namespaceName);
 
         admin.namespaces().grantPermissionOnNamespace(namespaceName, "Proxy",
@@ -279,7 +278,7 @@ public class ProxyWithAuthorizationTest extends 
ProducerConsumerBase {
         String namespaceName = "my-property/proxy-authorization/my-ns";
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization")));
         admin.namespaces().createNamespace(namespaceName);
 
         admin.namespaces().grantPermissionOnNamespace(namespaceName, "Proxy",
@@ -329,7 +328,7 @@ public class ProxyWithAuthorizationTest extends 
ProducerConsumerBase {
         String namespaceName = "my-property/proxy-authorization/my-ns";
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization")));
         admin.namespaces().createNamespace(namespaceName);
 
         admin.namespaces().grantPermissionOnNamespace(namespaceName, "Proxy",
@@ -364,7 +363,7 @@ public class ProxyWithAuthorizationTest extends 
ProducerConsumerBase {
         createAdminClient();
 
         admin.properties().createProperty("my-property",
-                new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization")));
+                new PropertyAdmin(Sets.newHashSet("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization")));
         admin.namespaces().createNamespace(namespaceName);
 
         admin.namespaces().grantPermissionOnNamespace(namespaceName, "Proxy",
diff --git 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithoutServiceDiscoveryTest.java
 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithoutServiceDiscoveryTest.java
index ca22a8f..02770be 100644
--- 
a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithoutServiceDiscoveryTest.java
+++ 
b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithoutServiceDiscoveryTest.java
@@ -45,7 +45,6 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 import org.testng.collections.Maps;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 public class ProxyWithoutServiceDiscoveryTest extends ProducerConsumerBase {
@@ -154,7 +153,7 @@ public class ProxyWithoutServiceDiscoveryTest extends 
ProducerConsumerBase {
         // create a client which connects to proxy over tls and pass authData
         PulsarClient proxyClient = createPulsarClient(authTls, 
proxyServiceUrl);
 
-        admin.properties().createProperty("my-property", new 
PropertyAdmin(Lists.newArrayList("appid1", "appid2"),
+        admin.properties().createProperty("my-property", new 
PropertyAdmin(Sets.newHashSet("appid1", "appid2"),
                 Sets.newHashSet("without-service-discovery")));
         
admin.namespaces().createNamespace("my-property/without-service-discovery/my-ns");
 

-- 
To stop receiving notification emails like this one, please contact
mme...@apache.org.

Reply via email to