@Override
    public void setControllers(List<ControllerInfo> controllers) {
        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)) {
            try {
                NetconfDevice device = controller.getNetconfDevice(ncdeviceId);
                String config = createVoltControllersConfig(
                        XmlConfigParser.loadXml(getClass().
                                getResourceAsStream(RESOURCE_XML)),
                        RUNNING, MERGE, controllers);
                device.getSession().editConfig(config.substring(
                        config.indexOf(END_LICENSE_HEADER) + END_LICENSE_HEADER.length()));
            } catch (NetconfException e) {
                log.error("Cannot communicate to device {} , exception {}", ncdeviceId, e);
            }
        } else {
            log.warn("I'm not master for {} please use master, {} to execute command",
                     ncdeviceId,
                     mastershipService.getMasterFor(ncdeviceId));
        }
    }
@Test
    public void testSetControllers() throws Exception {
        List<ControllerInfo> controllers = new ArrayList<>();

        for (int i = ZERO; i < SET_CONTROLLERS.length; i++) {
            String target = SET_CONTROLLERS[i];
            String[] data = target.split(TEST_COLON);
            currentKey = i + ONE;

            Annotations annotations = DefaultAnnotations
                                          .builder()
                                          .set(TEST_OFCONFIG_ID, currentKey.toString())
                                          .build();
            ControllerInfo controller = new ControllerInfo(
                    IpAddress.valueOf(data[SECOND_PART]),
                    Integer.parseInt(data[THIRD_PART]),
                        data[FIRST_PART], annotations);
            controllers.add(controller);
        }

        voltConfig.setControllers(controllers);
    }