ExporterUtil { public static String convertIpAddress(IpAddress ip) { String ret = null; if (ip != null) { if (ip.getIpv4Address() != null) { ret = ip.getIpv4Address().getValue(); } else if (ip.getIpv6Address() != null) { ret = ip.getIpv6Address().getValue(); } } return ret; }  static String convertIpAddress(IpAddress ip); static final String _TRANSPORT; static final String _EID; static final String _IP; static final String _PORT; static final String _MAC; static final String _VLAN_ID; static final String _FUNCTION_NAME; static final String _VXLAN_GPE; static final String _GRE; static final String _OTHER; static final String _SF_DPL_NAME; static final String _SFF_DPL_NAME; static final String FUNCTION; static final String IP; static final String LISP; static final String MAC; static final String VXLAN_GPE; static final String GRE; static final String OTHER; static final String SERVICE_LOCATOR_PREFIX; }
@Test public void testConvertIpAddressIpV6() { String ipV6 = "FF:FF:FF:FF:FF:FF:FF:FF"; String result = ExporterUtil.convertIpAddress(new IpAddress(new Ipv6Address(ipV6))); assertNotNull("Must not be null", result); assertEquals("Must be Equal", result, ipV6); }