@Override
    public boolean setNniLink(String target) {
        DriverHandler handler = handler();
        NetconfController controller = handler.get(NetconfController.class);
        MastershipService mastershipService = handler.get(MastershipService.class);
        DeviceId ncDeviceId = handler.data().deviceId();
        checkNotNull(controller, "Netconf controller is null");

        if (!mastershipService.isLocalMaster(ncDeviceId)) {
            log.warn("Not master for {} Use {} to execute command",
                     ncDeviceId,
                     mastershipService.getMasterFor(ncDeviceId));
            return false;
        }

        String[] data = target.split(COLON);
        if (data.length != THREE) {
            log.error("Invalid number of arguments {}", target);
            return false;
        }

        try {
            int nni = Integer.parseInt(data[FIRST_PART]);
            if (nni <= ZERO) {
                log.error("Invalid integer for nnilink-id:{}", target);
                return false;
            }
        } catch (NumberFormatException e) {
            log.error("Non-number input for nnilink-id:{}", target);
            return false;
        }

        if (!checkSetParam(data[SECOND_PART], data[THIRD_PART])) {
            log.error("Failed to check input {}", target);
            return false;
        }

        try {
            StringBuilder request = new StringBuilder();
            request.append(VOLT_NE_OPEN + VOLT_NE_NAMESPACE)
                .append(ANGLE_RIGHT + NEW_LINE)
                .append(buildStartTag(VOLT_PORTS))
                .append(buildStartTag(ETH_NNILINK_PORTS))
                .append(buildStartTag(ETH_NNILINK_PORT))
                .append(buildStartTag(NNILINK_ID, false))
                .append(data[FIRST_PART])
                .append(buildEndTag(NNILINK_ID))

                .append(buildStartTag(data[SECOND_PART], false))
                .append(data[THIRD_PART])
                .append(buildEndTag(data[SECOND_PART]))

                .append(buildEndTag(ETH_NNILINK_PORT))
                .append(buildEndTag(ETH_NNILINK_PORTS))
                .append(buildEndTag(VOLT_PORTS))
                .append(VOLT_NE_CLOSE);

            controller.getDevicesMap()
                .get(ncDeviceId)
                .getSession()
                .editConfig(RUNNING, null, request.toString());
        } catch (NetconfException e) {
            log.error("Cannot communicate to device {} exception {}", ncDeviceId, e);
            return false;
        }
        return true;
    }
@Test
    public void testValidSetNniLinkInput() throws Exception {
        String target;
        boolean result;

        for (int i = ZERO; i < VALID_SET_TCS.length; i++) {
            target = VALID_SET_TCS[i];
            currentKey = i;
            result = voltConfig.setNniLink(target);
            assertTrue("Incorrect response for VALID_SET_TCS", result);
        }
    }