RoutingConfigServiceImpl implements RoutingConfigService, BindingAwareProvider, AutoCloseable { public List<BgpSpeaker> getBgpSpeakerFromMap() { List<BgpSpeaker> bgpSpeakers = null; if(bgpSpeakerMap != null) { bgpSpeakers = new ArrayList<BgpSpeaker>(); Iterator<BgpSpeaker> iterator = bgpSpeakerMap.values().iterator(); while(iterator.hasNext()) { bgpSpeakers.add(iterator.next()); } } return bgpSpeakers; } RoutingConfigServiceImpl(DataBroker dataBroker); @Override void onSessionInitiated(ProviderContext session); @Override boolean isIpAddressLocal(IpAddress ipAddress); @Override boolean isIpPrefixLocal(AtriumIpPrefix ipPrefix); @Override void close(); @Override BgpSpeakers getBgpSpeakers(); @Override BgpPeers getBgpPeers(); @Override BgpSpeaker getBgpSpeakerByMac(String mac); @Override BgpPeer getBgpPeerByIpAddress(IpAddress ip); @Override AtriumInterface getInterface(NodeConnector connectPoint); @Override AtriumInterface getMatchingInterface(IpAddress ipAddress); @Override Set<AtriumInterface> getInterfaces(); List<BgpSpeaker> getBgpSpeakerFromMap(); List<BgpPeer> getBgpPeerFromMap();  }
@Test public void testBgpSpeakers() { List<BgpSpeaker> bgpSpeakers = routingConfigService.getBgpSpeakerFromMap(); assertNotNull(bgpSpeakers); assertEquals(1, bgpSpeakers.size()); }