public static List<PortDescription> parseJuniperPorts(HierarchicalConfiguration cfg) {
        //This methods ignores some internal ports

        List<PortDescription> portDescriptions = new ArrayList<>();
        List<HierarchicalConfiguration> subtrees =
                cfg.configurationsAt(IF_INFO);
        for (HierarchicalConfiguration interfInfo : subtrees) {
            List<HierarchicalConfiguration> interfaceTree =
                    interfInfo.configurationsAt(IF_PHY);
            for (HierarchicalConfiguration phyIntf : interfaceTree) {
                if (phyIntf == null) {
                    continue;
                }
                // parse physical Interface
                parsePhysicalInterface(portDescriptions, phyIntf);
            }
        }
        return portDescriptions;
    }
@Test
    public void testInterfacesParsedFromJunos18() {
        HierarchicalConfiguration reply = XmlConfigParser.loadXml(
                getClass().getResourceAsStream("/Junos_get-interface-information_response_18.4.xml"));

        final Collection<PortDescription> expected = new ArrayList<>();
        expected.add(DefaultPortDescription.builder()
                .withPortNumber(PortNumber.portNumber(513L)).isRemoved(false)
                .type(Port.Type.COPPER).portSpeed(JuniperUtils.DEFAULT_PORT_SPEED)
                .annotations(DefaultAnnotations.builder()
                        .set(JuniperUtils.AK_OPER_STATUS, "up")
                        .set(AnnotationKeys.PORT_NAME, "jsrv")
                        .set(JuniperUtils.AK_IF_TYPE, "Ethernet")
                        .set(AnnotationKeys.PORT_MAC, "2c:6b:f5:03:ff:c0")
                        .set(JuniperUtils.AK_ADMIN_STATUS, "up")
                        .build()).build());
        expected.add(DefaultPortDescription.builder()
                .withPortNumber(PortNumber.portNumber(514L))
                .isRemoved(false).type(Port.Type.COPPER)
                .portSpeed(JuniperUtils.DEFAULT_PORT_SPEED)
                .annotations(
                        DefaultAnnotations.builder()
                        .set(JuniperUtils.AK_ENCAPSULATION, "unknown")
                        .set("portName", "jsrv.1")
                        .set(JuniperUtils.AK_PHYSICAL_PORT_NAME, "jsrv")
                        .set("inet", "128.0.0.127")
                        .set("ip", "128.0.0.127")
                        .build()).build());

        assertEquals(expected, JuniperUtils.parseJuniperPorts(reply));
    }