@Test public void testNoPeerInterface() { IpAddress ip = IpAddress.valueOf("1.1.1.1"); bgpSpeakers.clear(); bgpSpeakers.add(new BgpConfig.BgpSpeakerConfig(Optional.of("foo"), VlanId.NONE, s1Eth100, Collections.singleton(ip))); reset(interfaceService); interfaceService.addListener(anyObject(InterfaceListener.class)); expect(interfaceService.getMatchingInterface(ip)).andReturn(null).anyTimes(); replay(interfaceService); reset(intentSynchronizer); replay(intentSynchronizer); peerConnectivityManager.start(); verify(intentSynchronizer); }
public void start() { configService.addListener(configListener); interfaceService.addListener(interfaceListener); setUpConnectivity(); }
PeerConnectivityManager { public void start() { configService.addListener(configListener); interfaceService.addListener(interfaceListener); setUpConnectivity(); } }
PeerConnectivityManager { public void start() { configService.addListener(configListener); interfaceService.addListener(interfaceListener); setUpConnectivity(); } PeerConnectivityManager(ApplicationId appId,
                                   IntentSynchronizationService intentSynchronizer,
                                   NetworkConfigService configService,
                                   ApplicationId routerAppId,
                                   InterfaceService interfaceService); }
PeerConnectivityManager { public void start() { configService.addListener(configListener); interfaceService.addListener(interfaceListener); setUpConnectivity(); } PeerConnectivityManager(ApplicationId appId,
                                   IntentSynchronizationService intentSynchronizer,
                                   NetworkConfigService configService,
                                   ApplicationId routerAppId,
                                   InterfaceService interfaceService); void start(); void stop(); }
PeerConnectivityManager { public void start() { configService.addListener(configListener); interfaceService.addListener(interfaceListener); setUpConnectivity(); } PeerConnectivityManager(ApplicationId appId,
                                   IntentSynchronizationService intentSynchronizer,
                                   NetworkConfigService configService,
                                   ApplicationId routerAppId,
                                   InterfaceService interfaceService); void start(); void stop();  }