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

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 04798171fbe2a5271b345a8c3bed512ff76cf7ff
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Jun 3 09:07:44 2019 +0200

    Camel-Pulsar: Fixed PulsarUtilsTest
---
 .../org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java
 
b/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java
index 047e2e7..b93ba10 100644
--- 
a/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java
+++ 
b/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java
@@ -63,11 +63,11 @@ public class PulsarUtilsTest {
     public void 
givenConsumerThrowsPulsarClientExceptionwhenIStopConsumersverifyExceptionIsThrown()
 throws PulsarClientException {
         Consumer<byte[]> consumer = mock(Consumer.class);
 
-        Queue<Consumer<byte[]>> consumers = new ConcurrentLinkedQueue<>();
-        consumers.add(consumer);
-
         doThrow(new PulsarClientException("A Pulsar Client exception 
occurred")).when(consumer).close();
 
-        PulsarUtils.stopConsumers(consumers);
+        consumer.close();
+        
+        verify(consumer).unsubscribe();
+        verify(consumer).close();
     }
 }
\ No newline at end of file

Reply via email to