UNOMI-419: fix SegmentsIT test to wait on full startup (#256)

diff --git a/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java b/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java
index fceb70c..1ca2e8b 100644
--- a/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java
@@ -22,6 +22,7 @@
 import org.apache.unomi.api.segments.Segment;
 import org.apache.unomi.api.services.SegmentService;
 import org.apache.unomi.api.exceptions.BadSegmentConditionException;
+import org.apache.unomi.lifecycle.BundleWatcher;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -46,8 +47,15 @@
     @Filter(timeout = 600000)
     protected SegmentService segmentService;
 
+    @Inject @Filter(timeout = 600000)
+    protected BundleWatcher bundleWatcher;
+
     @Before
     public void setUp() throws InterruptedException {
+        while (!bundleWatcher.isStartupComplete()) {
+            LOGGER.info("Waiting for startup to complete...");
+            Thread.sleep(1000);
+        }
         removeItems(Segment.class);
     }