/** Tests a corner case, when there is no BGP speakers in the configuration. */
  @Test
  public void testNullBgpSpeakers() {
    reset(bgpConfig);
    expect(bgpConfig.bgpSpeakers()).andReturn(Collections.emptySet()).anyTimes();
    replay(bgpConfig);

    // We don't expect any intents in this case
    reset(intentSynchronizer);
    replay(intentSynchronizer);
    peerConnectivityManager.start();
    verify(intentSynchronizer);
  }
  /** Initializes peer connectivity testing environment. */
  private void initPeerConnectivity() {
    expect(bgpConfig.bgpSpeakers()).andReturn(bgpSpeakers).anyTimes();
    replay(bgpConfig);
    expect(networkConfigService.getConfig(APPID, BgpConfig.class)).andReturn(bgpConfig).anyTimes();
    replay(networkConfigService);
    replay(interfaceService);

    intentSynchronizer = createMock(IntentSynchronizationService.class);
    replay(intentSynchronizer);

    peerConnectivityManager =
        new PeerConnectivityManager(
            APPID, intentSynchronizer, networkConfigService, CONFIG_APP_ID, interfaceService);
  }