Make unit tests to only use dynamically allocated ports (#5486)

* Make unit tests to only use dynamically allocated ports

* Fixed proxy tests

* Fixed zk test utils after merge

* Fixed multi host client test

* Fix for testConcurrentConsumerReceiveWhileReconnect

* Increased timeout on testPulsarSourceLocalRunWithFile

* Fixed newer test to also avoid port manager

* Fixed test race condition with thread starting in PulsarFunctionLocalRunTest

* Fixed ProxyWithAuthorizationNegTest

* Fixed ProxySaslAuthenticationTest
diff --git a/pulsar-io/flume/src/test/java/org/apache/pulsar/io/flume/source/StringSourceTests.java b/pulsar-io/flume/src/test/java/org/apache/pulsar/io/flume/source/StringSourceTests.java
index e667cb2..b50a386 100644
--- a/pulsar-io/flume/src/test/java/org/apache/pulsar/io/flume/source/StringSourceTests.java
+++ b/pulsar-io/flume/src/test/java/org/apache/pulsar/io/flume/source/StringSourceTests.java
@@ -18,28 +18,30 @@
  */
 package org.apache.pulsar.io.flume.source;
 
+import static org.mockito.Mockito.mock;
+
 import com.google.common.base.Charsets;
 import com.google.common.collect.Maps;
 
-import org.apache.bookkeeper.test.PortManager;
-import org.apache.flume.*;
+import java.util.Map;
+
+import org.apache.flume.Channel;
+import org.apache.flume.Context;
+import org.apache.flume.Event;
+import org.apache.flume.Sink;
+import org.apache.flume.Transaction;
+import org.apache.flume.channel.MemoryChannel;
 import org.apache.flume.conf.Configurables;
 import org.apache.flume.event.EventBuilder;
+import org.apache.flume.sink.AvroSink;
 import org.apache.pulsar.io.core.SourceContext;
+import org.apache.pulsar.io.flume.AbstractFlumeTests;
+import org.junit.Assert;
 import org.mockito.Mock;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
-import org.apache.flume.sink.AvroSink;
-import org.apache.flume.channel.MemoryChannel;
-import org.junit.Assert;
-
-import java.util.Map;
-
-import org.apache.pulsar.io.flume.AbstractFlumeTests;
 import org.testng.annotations.Test;
 
-import static org.mockito.Mockito.*;
-
 public class StringSourceTests extends AbstractFlumeTests {
 
     private AvroSink sink;