@Override
    public void forward(DeviceId deviceId, ForwardingObjective forwardingObjective) {
        checkPermission(FLOWRULE_WRITE);
        if (forwardingObjective.nextId() == null ||
                flowObjectiveStore.getNextGroup(forwardingObjective.nextId()) != null ||
                !queueFwdObjective(deviceId, forwardingObjective)) {
            // fast path
            installerExecutor.execute(new ObjectiveProcessor(deviceId, forwardingObjective, installerExecutor));
        }
    }
@Test
    public void deviceUpEvent() throws TestUtilsException {
        TrafficSelector selector = DefaultTrafficSelector.emptySelector();
        TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();

        DeviceEvent event = new DeviceEvent(DeviceEvent.Type.DEVICE_ADDED, d2);
        DeviceListener listener = TestUtils.getField(manager, "deviceListener");
        assertThat(listener, notNullValue());

        listener.event(event);

        ForwardingObjective forward =
                DefaultForwardingObjective.builder()
                        .fromApp(NetTestTools.APP_ID)
                        .withFlag(ForwardingObjective.Flag.SPECIFIC)
                        .withSelector(selector)
                        .withTreatment(treatment)
                        .makePermanent()
                        .add();
        manager.forward(id2, forward);

        // new device should have an objective now
        TestTools.assertAfter(RETRY_MS, () ->
                assertThat(forwardingObjectives, hasSize(1)));

        assertThat(forwardingObjectives, hasItem("of:d2"));
        assertThat(filteringObjectives, hasSize(0));
        assertThat(nextObjectives, hasSize(0));
    }