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 00a40966b96c5a352fd0302a60f58e3519e1b612
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Mon Jul 29 12:37:38 2019 +0200

    Camel-Micrometer: Fixed CS
---
 .../AbstractMicrometerEventNotifierTest.java         |  4 ++--
 .../messagehistory/ManagedMessageHistoryTest.java    | 20 +++++++-------------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git 
a/components/camel-micrometer/src/test/java/org/apache/camel/component/micrometer/eventNotifier/AbstractMicrometerEventNotifierTest.java
 
b/components/camel-micrometer/src/test/java/org/apache/camel/component/micrometer/eventNotifier/AbstractMicrometerEventNotifierTest.java
index ea20308..6aea10b 100644
--- 
a/components/camel-micrometer/src/test/java/org/apache/camel/component/micrometer/eventNotifier/AbstractMicrometerEventNotifierTest.java
+++ 
b/components/camel-micrometer/src/test/java/org/apache/camel/component/micrometer/eventNotifier/AbstractMicrometerEventNotifierTest.java
@@ -31,7 +31,7 @@ import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
 
 abstract class AbstractMicrometerEventNotifierTest extends CamelTestSupport {
-       
+
     @BindToRegistry(MicrometerConstants.METRICS_REGISTRY_NAME)
     protected CompositeMeterRegistry meterRegistry;
 
@@ -41,7 +41,7 @@ abstract class AbstractMicrometerEventNotifierTest extends 
CamelTestSupport {
     }
 
     public void addRegistry() throws Exception {
-       meterRegistry = new CompositeMeterRegistry();
+        meterRegistry = new CompositeMeterRegistry();
         meterRegistry.add(new SimpleMeterRegistry());
         meterRegistry.add(new JmxMeterRegistry(CamelJmxConfig.DEFAULT, 
Clock.SYSTEM, HierarchicalNameMapper.DEFAULT));
     }
diff --git 
a/components/camel-micrometer/src/test/java/org/apache/camel/component/micrometer/messagehistory/ManagedMessageHistoryTest.java
 
b/components/camel-micrometer/src/test/java/org/apache/camel/component/micrometer/messagehistory/ManagedMessageHistoryTest.java
index 80e67d5..5414309 100644
--- 
a/components/camel-micrometer/src/test/java/org/apache/camel/component/micrometer/messagehistory/ManagedMessageHistoryTest.java
+++ 
b/components/camel-micrometer/src/test/java/org/apache/camel/component/micrometer/messagehistory/ManagedMessageHistoryTest.java
@@ -35,7 +35,7 @@ import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 
 public class ManagedMessageHistoryTest extends CamelTestSupport {
-       
+
     @BindToRegistry(MicrometerConstants.METRICS_REGISTRY_NAME)
     private CompositeMeterRegistry meterRegistry;
 
@@ -47,7 +47,7 @@ public class ManagedMessageHistoryTest extends 
CamelTestSupport {
     protected MBeanServer getMBeanServer() {
         return 
context.getManagementStrategy().getManagementAgent().getMBeanServer();
     }
-    
+
     public void addRegistry() throws Exception {
         meterRegistry = new CompositeMeterRegistry();
         meterRegistry.add(new SimpleMeterRegistry());
@@ -91,10 +91,7 @@ public class ManagedMessageHistoryTest extends 
CamelTestSupport {
         Set<ObjectName> set = getMBeanServer().queryNames(new 
ObjectName("org.apache.camel.micrometer:name=CamelMessageHistory.*"), null);
         assertEquals(3, set.size());
 
-        ObjectName fooMBean = set.stream()
-                .filter(on -> on.getCanonicalName().contains("foo"))
-                .findFirst()
-                .orElseThrow(() -> new AssertionError("Expected MBean with 
node Id foo"));
+        ObjectName fooMBean = set.stream().filter(on -> 
on.getCanonicalName().contains("foo")).findFirst().orElseThrow(() -> new 
AssertionError("Expected MBean with node Id foo"));
 
         Long testCount = (Long)getMBeanServer().getAttribute(fooMBean, 
"Count");
         assertEquals(count / 2, testCount.longValue());
@@ -102,10 +99,10 @@ public class ManagedMessageHistoryTest extends 
CamelTestSupport {
         // get the message history service using JMX
         String name = 
String.format("org.apache.camel:context=%s,type=services,name=MicrometerMessageHistoryService",
 context.getManagementName());
         ObjectName on = ObjectName.getInstance(name);
-        String json = (String) getMBeanServer().invoke(on, 
"dumpStatisticsAsJson", null, null);
+        String json = (String)getMBeanServer().invoke(on, 
"dumpStatisticsAsJson", null, null);
         assertNotNull(json);
         log.info(json);
-        
+
         assertTrue(json.contains("\"nodeId\" : \"foo\""));
         assertTrue(json.contains("\"nodeId\" : \"bar\""));
         assertTrue(json.contains("\"nodeId\" : \"baz\""));
@@ -117,12 +114,9 @@ public class ManagedMessageHistoryTest extends 
CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() {
-                from("seda:foo").routeId("route1")
-                        .to("mock:foo").id("foo");
+                from("seda:foo").routeId("route1").to("mock:foo").id("foo");
 
-                from("seda:bar").routeId("route2")
-                        .to("mock:bar").id("bar")
-                        .to("mock:baz").id("baz");
+                
from("seda:bar").routeId("route2").to("mock:bar").id("bar").to("mock:baz").id("baz");
             }
         };
     }

Reply via email to