@Test
public void testRemoveVCbyCP() {

    testConnectionSetup();
    List<PointToPointIntent> removedIntents = new ArrayList<>();
    SdxL2ConnectionPoint cpone = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST1", CP1, VLANS1, CEMAC1);
    removedIntents.addAll(setupConnectionPoints1To2());
    SdxL2ConnectionPoint cpsix = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST6", CP6, VLANS6, CEMAC6);
    removedIntents.addAll(setupConnectionPoints5To6());
    SdxL2ConnectionPoint cpseven = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST7", CP7, VLANS7, CEMAC7);
    removedIntents.addAll(setupConnectionPoints7To8());
    SdxL2ConnectionPoint cpten = SdxL2ConnectionPoint.sdxl2ConnectionPoint("TEST10", CP10, VLANS10, CEMAC10);
    removedIntents.addAll(setupConnectionPoints9To10());
    manager.removeVC(cpone);
    manager.removeVC(cpsix);
    manager.removeVC(cpseven);
    manager.removeVC(cpten);
    assertEquals(Collections.emptySet(), manager.getVCs(Optional.empty()));
    assertEquals(0, 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);
    }
}