@Test
public void removeVCAndIntents() {

    testConnectionSetup();
    List<PointToPointIntent> removedIntents = new ArrayList<>();
    SdxL2ConnectionPoint cpone = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST1", CP1, VLANS1, CEMAC1);
    SdxL2ConnectionPoint cptwo = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST2", CP2, VLANS2, CEMAC2);
    removedIntents.addAll(setupConnectionPoints1To2());
    SdxL2ConnectionPoint cpfive = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST5", CP5, VLANS5, CEMAC5);
    SdxL2ConnectionPoint cpsix = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST6", CP6, VLANS6, CEMAC6);
    removedIntents.addAll(setupConnectionPoints5To6());
    SdxL2ConnectionPoint cpseven = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST7", CP7, VLANS7, CEMAC7);
    SdxL2ConnectionPoint cpeight = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST8", CP8, VLANS8, CEMAC8);
    removedIntents.addAll(setupConnectionPoints7To8());
    manager.removeVC(cpone, cptwo);
    manager.removeVC(cpfive, cpsix);
    manager.removeVC(cpseven, cpeight);
    assertEquals(2, manager.intentService.getIntentCount());
    for (Intent removedIntent : removedIntents) {
        boolean found = false;
        for (Intent existingIntent : manager.intentService.getIntents()) {
            if (removedIntent.key().equals(existingIntent.key())) {
                found = true;
                assertTrue(format("Intent %s equal %s", removedIntent, existingIntent),
                           !IntentUtils.intentsAreEqual(removedIntent, existingIntent));
                break;
            }
        }
        assertTrue(!found);
    }
}