private void withdraw(ResolvedRoute route) {
        synchronized (this) {
            IpPrefix prefix = route.prefix();
            MultiPointToSinglePointIntent intent = routeIntents.remove(prefix);
            if (intent == null) {
                log.trace("No intent in routeIntents to delete for prefix: {}",
                          prefix);
                return;
            }
            intentSynchronizer.withdraw(intent);
        }
    }
@Test
    public void testRemoveEgressInterface() {
        // Add a route first
        testRouteAddToNoVlan();

        // Create existing intent
        MultiPointToSinglePointIntent removedIntent =
                createIntentToThreeSrcOneTwo(PREFIX1);

        // Set up expectation
        reset(intentSynchronizer);
        // Setup the expected intents
        intentSynchronizer.withdraw(eqExceptId(removedIntent));
        replay(intentSynchronizer);

        // Define the existing egress interface and remove it
        Interface intf = new Interface("sw3-eth1", SW3_ETH1,
                                       Collections.singletonList(IIP3),
                                       MAC3, VlanId.NONE);
        InterfaceEvent intfEvent =
                new InterfaceEvent(InterfaceEvent.Type.INTERFACE_REMOVED, intf);
        interfaceListener.event(intfEvent);

        verify(intentSynchronizer);
    }