@Override
    public void connectTables(DeviceId deviceId, int fromTable, int toTable) {
        TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
        TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();

        treatment.transition(toTable);

        FlowRule flowRule = DefaultFlowRule.builder()
                .forDevice(deviceId)
                .withSelector(selector.build())
                .withTreatment(treatment.build())
                .withPriority(DROP_PRIORITY)
                .fromApp(appId)
                .makePermanent()
                .forTable(fromTable)
                .build();

        applyRule(flowRule, true);
    }
@Test
    public void testConnectTables() {
        int testFromTable = 1;
        int testToTable = 2;

        fros = Sets.newConcurrentHashSet();

        TrafficSelector.Builder selectorBuilder = DefaultTrafficSelector.builder();
        TrafficTreatment.Builder treatmentBuilder = DefaultTrafficTreatment.builder();

        target.connectTables(DEVICE_ID, testFromTable, testToTable);

        FlowRule.Builder flowRuleBuilder = DefaultFlowRule.builder()
                .forDevice(DEVICE_ID)
                .withSelector(selectorBuilder.build())
                .withTreatment(treatmentBuilder.transition(testToTable).build())
                .withPriority(DROP_PRIORITY)
                .fromApp(TEST_APP_ID)
                .forTable(testFromTable)
                .makePermanent();

        validateFlowRule(flowRuleBuilder.build());
    }