@Override
    public String rebootOnu(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");
        String reply = null;
        String[] onuId = null;

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

        onuId = checkIdString(target, TWO);
        if (onuId == null) {
            log.error("Invalid ONU identifier {}", target);
            return null;
        }

        try {
            StringBuilder request = new StringBuilder();
            request.append(ANGLE_LEFT + ONU_REBOOT + SPACE);
            request.append(VOLT_NE_NAMESPACE + ANGLE_RIGHT + NEW_LINE);

            request.append(buildStartTag(PONLINK_ID, false))
                .append(onuId[FIRST_PART])
                .append(buildEndTag(PONLINK_ID))
                .append(buildStartTag(ONU_ID, false))
                .append(onuId[SECOND_PART])
                .append(buildEndTag(ONU_ID))
                .append(buildEndTag(ONU_REBOOT));

            reply = controller
                    .getDevicesMap()
                    .get(ncDeviceId)
                    .getSession()
                    .doWrappedRpc(request.toString());
        } catch (NetconfException e) {
            log.error("Cannot communicate to device {} exception {}", ncDeviceId, e);
        }
        return reply;
    }
@Test
    public void testValidRebootOnu() throws Exception {
        String reply;
        String target;

        for (int i = ZERO; i < VALID_REBOOT_TCS.length; i++) {
            target = VALID_REBOOT_TCS[i];
            currentKey = i;
            reply = voltConfig.rebootOnu(target);
            assertNotNull("Incorrect response for VALID_REBOOT_TCS", reply);
        }
    }