[ONOS-7202] IntentCleanupTestMock always fail in jenkins test

Change-Id: Id81e14eea044d4e911b162e1535a9239b0372547
(cherry picked from commit 8013c4f7ba5f06d932d06e7f0d010b8d46176f6c)
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentCleanupTestMock.java b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentCleanupTestMock.java
index 40b05c3..dcc4188 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentCleanupTestMock.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentCleanupTestMock.java
@@ -53,19 +53,11 @@
         store = new SimpleIntentStore();
         cleanup = new IntentCleanup();
 
-        service.addListener(cleanup);
-        expectLastCall().once();
-        replay(service);
-
         cleanup.cfgService = new ComponentConfigAdapter();
         cleanup.service = service;
         cleanup.store = store;
         cleanup.period = 1000;
         cleanup.retryThreshold = 3;
-        cleanup.activate();
-
-        verify(service);
-        reset(service);
 
         assertTrue("store should be empty",
                    Sets.newHashSet(cleanup.store.getIntents()).isEmpty());
@@ -75,15 +67,6 @@
 
     @After
     public void tearDown() {
-        service.removeListener(cleanup);
-        expectLastCall().once();
-        replay(service);
-
-        cleanup.deactivate();
-
-        verify(service);
-        reset(service);
-
         super.tearDown();
     }
 
@@ -113,9 +96,8 @@
         expectLastCall().once();
         replay(service);
 
-        synchronized (service) {
-            cleanup.run();
-        }
+        cleanup.run();
+
         verify(service);
         reset(service);
     }
@@ -210,6 +192,9 @@
         data = new IntentData(intent2, INSTALL_REQ, version);
         store.addPending(data);
 
+        service.submit(intent);
+        expectLastCall().once();
+
         service.submit(intent2);
         expectLastCall().once();
         replay(service);