import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import static org.opendaylight.infrautils.ready.testutils.TestSystemReadyMonitor.Behaviour.IMMEDIATE;
import com.google.common.base.Optional;
import org.junit.Before;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.infrautils.diagstatus.DiagStatusService;
-import org.opendaylight.infrautils.ready.SystemReadyListener;
-import org.opendaylight.infrautils.ready.SystemReadyMonitor;
-import org.opendaylight.infrautils.ready.SystemState;
+import org.opendaylight.infrautils.ready.testutils.TestSystemReadyMonitor;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.mdsal.dom.api.DOMSchemaService;
import org.opendaylight.mdsal.eos.binding.api.Entity;
Mockito.mock(OvsdbConnection.class),
Mockito.mock(DOMSchemaService.class),
Mockito.mock(BindingNormalizedNodeSerializer.class),
- new ImmediateSystemReadyMonitor(),
+ new TestSystemReadyMonitor(IMMEDIATE),
Mockito.mock(DiagStatusService.class))) {
// Initiate the session
Mockito.mock(OvsdbConnection.class),
Mockito.mock(DOMSchemaService.class),
Mockito.mock(BindingNormalizedNodeSerializer.class),
- new ImmediateSystemReadyMonitor(),
+ new TestSystemReadyMonitor(IMMEDIATE),
Mockito.mock(DiagStatusService.class))) {
// Initiate the session
Mockito.mock(OvsdbConnection.class),
Mockito.mock(DOMSchemaService.class),
Mockito.mock(BindingNormalizedNodeSerializer.class),
- new ImmediateSystemReadyMonitor(),
+ new TestSystemReadyMonitor(IMMEDIATE),
Mockito.mock(DiagStatusService.class))) {
southboundProvider.init();
Mockito.mock(OvsdbConnection.class),
Mockito.mock(DOMSchemaService.class),
Mockito.mock(BindingNormalizedNodeSerializer.class),
- new ImmediateSystemReadyMonitor(),
+ new TestSystemReadyMonitor(IMMEDIATE),
Mockito.mock(DiagStatusService.class))) {
southboundProvider.init();
topologyIid).checkedGet().isPresent());
}
}
-
- private static class ImmediateSystemReadyMonitor implements SystemReadyMonitor {
-
- @Override
- public SystemState getSystemState() {
- return SystemState.ACTIVE;
- }
-
- @Override
- public void registerListener(SystemReadyListener listener) {
- listener.onSystemBootReady();
- }
-
- @Override
- public String getFailureCause() {
- return "";
- }
- }
}