public static List<DeviceInterfaceDescription> getInterfacesFromConfig(
            HierarchicalConfiguration cfg) {
        List<DeviceInterfaceDescription> intfs = Lists.newArrayList();
        List<HierarchicalConfiguration> subtrees =
                cfg.configurationsAt("data.xml-config-data.Device-Configuration.interface");
        for (HierarchicalConfiguration intfConfig :subtrees) {
            String intfName = getInterfaceName(intfConfig);
            DeviceInterfaceDescription.Mode intfMode = getInterfaceMode(intfConfig);
            List<VlanId> intfVlans = getInterfaceVlans(intfConfig, intfMode);
            short intfLimit = getInterfaceLimit(intfConfig);
            boolean intfLimited = (intfLimit == NO_LIMIT ?  false : true);
            DeviceInterfaceDescription intf =
                    new DefaultDeviceInterfaceDescription(intfName,
                                                          intfMode,
                                                          intfVlans,
                                                          intfLimited,
                                                          intfLimit);
            intfs.add(intf);
        }
        return intfs;
    }
@Test
    public void controllersConfig() {
        InputStream streamOrig = getClass().getResourceAsStream(CONFIG_XML_FILE);
        HierarchicalConfiguration cfgOrig = XmlConfigParser.loadXml(streamOrig);
        List<DeviceInterfaceDescription> actualIntfs =
                XmlParserCisco.getInterfacesFromConfig(cfgOrig);
        assertEquals("Interfaces were not retrieved from configuration",
                     getExpectedIntfs(), actualIntfs);
    }