SdxL2MacVCManager extends SdxL2VCManager { @Override public void addVC(String sdxl2, SdxL2ConnectionPoint sdxl2cplhs, SdxL2ConnectionPoint sdxl2cprhs) { String action = "created"; checkState(!(isNullMac(sdxl2cplhs.macAddress()) && isNullMac(sdxl2cprhs.macAddress())), errorMacNull, action, sdxl2cplhs.name() + " and " + sdxl2cprhs.name()); checkState(!isNullMac(sdxl2cprhs.macAddress()), errorMacNull, action, sdxl2cplhs.name()); checkState(!isNullMac(sdxl2cprhs.macAddress()), errorMacNull, action, sdxl2cprhs.name()); checkState(!sdxl2cplhs.macAddress().equals(sdxl2cprhs.macAddress()), errorMacEqual, action); super.addVC(sdxl2, sdxl2cplhs, sdxl2cprhs); } SdxL2MacVCManager(ApplicationId sdxl2id,
                             SdxL2Store store,
                             IntentService intentService); @Override Collection<Intent> buildIntents(String sdxl2, SdxL2ConnectionPoint ingress, SdxL2ConnectionPoint egress); @Override void addVC(String sdxl2, SdxL2ConnectionPoint sdxl2cplhs, SdxL2ConnectionPoint sdxl2cprhs); @Override void removeVC(SdxL2ConnectionPoint sdxl2cplhs, SdxL2ConnectionPoint sdxl2cprhs); @Override void removeVC(SdxL2ConnectionPoint cp);  }
@Test public void testConnectionSetup() { Iterator<SdxL2ConnectionPoint> lhs = setupLhsCPs().iterator(); Iterator<SdxL2ConnectionPoint> rhs = setupRhsCPs().iterator(); while (lhs.hasNext()) { manager.addVC(SDXL2_2, lhs.next(), rhs.next()); } assertEquals(intentList.size(), manager.intentService.getIntentCount()); for (Intent emulatedIntent : intentList) { boolean found = false; for (Intent realIntent : manager.intentService.getIntents()) { if (emulatedIntent.key().equals(realIntent.key())) { found = true; assertTrue(format("Comparing %s and %s", emulatedIntent, realIntent), IntentUtils.intentsAreEqual(emulatedIntent, realIntent)); break; } } assertTrue(found); } }