Fixed test
diff --git a/examples/spring/src/test/java/org/apache/camel/example/spring/IntegrationTest.java b/examples/spring/src/test/java/org/apache/camel/example/spring/IntegrationTest.java
index 234e155..f3e47cc 100644
--- a/examples/spring/src/test/java/org/apache/camel/example/spring/IntegrationTest.java
+++ b/examples/spring/src/test/java/org/apache/camel/example/spring/IntegrationTest.java
@@ -25,6 +25,7 @@
     @Test
     public void testCamelRulesDeployCorrectlyInSpring() throws Exception {
         // let's boot up the Spring application context for 2 seconds to check that it works OK
-        Main.main("-duration", "2s", "-o", "target/site/cameldoc");
+        Main main = new Main();
+        main.run(new String[]{"-duration", "2s", "-o", "target/site/cameldoc"});
     }
 }