@Override
    public List<ControllerInfo> getControllers() {
        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");
        List<ControllerInfo> controllers = new ArrayList<>();
        if (mastershipService.isLocalMaster(ncDeviceId)) {
            try {
                StringBuilder request = new StringBuilder();
                request.append(VOLT_NE_OPEN + VOLT_NE_NAMESPACE + ">\n");
                request.append(buildEmptyTag(VOLT_OFCONFIG));
                request.append(VOLT_NE_CLOSE);

                String reply;
                reply = controller
                            .getDevicesMap()
                            .get(ncDeviceId)
                            .getSession()
                            .get(request.toString(), REPORT_ALL);
                log.debug("Reply XML {}", reply);
                controllers.addAll(parseStreamVoltControllers(XmlConfigParser.
                        loadXml(new ByteArrayInputStream(reply.getBytes(StandardCharsets.UTF_8)))));
            } catch (NetconfException e) {
                log.error("Cannot communicate to device {} ", ncDeviceId);
            }
        } else {
            log.warn("I'm not master for {} please use master, {} to execute command",
                     ncDeviceId,
                     mastershipService.getMasterFor(ncDeviceId));
        }
        return ImmutableList.copyOf(controllers);
    }
@Test
    public void testGetControllers() throws Exception {
        List<ControllerInfo> controllers;
        List<ControllerInfo> expectedControllers = new ArrayList<>();

        for (int i = ZERO; i < GET_CONTROLLERS.length; i++) {
            String target = GET_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);
            expectedControllers.add(controller);
        }

        controllers = voltConfig.getControllers();
        assertTrue("Incorrect response", controllers.equals(expectedControllers));
    }