BUG-7003: Remove sleeping from Tests
[bgpcep.git] / programming / impl / src / test / java / org / opendaylight / bgpcep / programming / impl / MockedNotificationServiceWrapper.java
index c286c13c1d4f0ccd0df22ea7759450641bac3c8a..588aee29a8097b5a963df7a3ab966fa8929a574a 100644 (file)
@@ -12,6 +12,7 @@ import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.mock;
+import static org.opendaylight.protocol.util.CheckUtil.checkEquals;
 
 import com.google.common.collect.Lists;
 import java.util.List;
@@ -41,8 +42,8 @@ final class MockedNotificationServiceWrapper {
         return mockedNotificationService;
     }
 
-    void assertNotificationsCount(final int count) {
-        assertEquals(count, this.publishedNotifications.size());
+    void assertNotificationsCount(final int count) throws Exception {
+        checkEquals(()-> assertEquals(count, this.publishedNotifications.size()));
     }
 
     void assertInstructionStatusChangedNotification(final int idx, final InstructionId id, final InstructionStatus status) {