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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new a868fc1  Upgrade to junit 5
a868fc1 is described below

commit a868fc185714fe5e7c94f1acb6c85585c16e64cd
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sat May 15 12:36:00 2021 +0200

    Upgrade to junit 5
---
 examples/billboard-aggregate/pom.xml                   | 10 +---------
 .../camel/example/billboard/BillboardAggrTest.java     | 18 +++++++++++++-----
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/examples/billboard-aggregate/pom.xml 
b/examples/billboard-aggregate/pom.xml
index eab6838..1c5978a 100644
--- a/examples/billboard-aggregate/pom.xml
+++ b/examples/billboard-aggregate/pom.xml
@@ -32,8 +32,6 @@
     <description>Billboard aggregation example</description>
 
     <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <category>EIP</category>
@@ -77,15 +75,9 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-            <version>${junit-version}</version>
-        </dependency>
     </dependencies>
 
     <build>
diff --git 
a/examples/billboard-aggregate/src/test/java/org/apache/camel/example/billboard/BillboardAggrTest.java
 
b/examples/billboard-aggregate/src/test/java/org/apache/camel/example/billboard/BillboardAggrTest.java
index ec6de8c..74c06fe 100644
--- 
a/examples/billboard-aggregate/src/test/java/org/apache/camel/example/billboard/BillboardAggrTest.java
+++ 
b/examples/billboard-aggregate/src/test/java/org/apache/camel/example/billboard/BillboardAggrTest.java
@@ -19,19 +19,27 @@ package org.apache.camel.example.billboard;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
-import org.apache.camel.*;
+import org.apache.camel.AggregationStrategy;
+import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.ExtendedCamelContext;
+import org.apache.camel.Message;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.engine.PooledExchangeFactory;
 import org.apache.camel.model.dataformat.BindyType;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class BillboardAggrTest extends CamelTestSupport {
 
+    private static final Logger LOG = 
LoggerFactory.getLogger(BillboardAggrTest.class);
     private static final String BASE_PATH = System.getProperty("user.dir") + 
"/src/test/data";
 
     @Override
@@ -52,7 +60,7 @@ public class BillboardAggrTest extends CamelTestSupport {
 
         Map<String, Integer> top20 = ((MyAggregationStrategy) 
             
mock.getReceivedExchanges().get(0).getIn().getHeader("myAggregation")).getTop20Artists();
-        top20.forEach((k, v) -> log.info("{}, {}", k, v));
+        top20.forEach((k, v) -> LOG.info("{}, {}", k, v));
         assertEquals(20, top20.size());
         assertEquals(35, (int) top20.get("madonna"));
         assertEquals(26, (int) top20.get("elton john"));

Reply via email to