### Question:
SouthboundUtil { @VisibleForTesting static String getLocalControllerHostIpAddress() { String ipaddress = null; try { Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces(); if (ifaces != null) { while (ifaces.hasMoreElements()) { NetworkInterface iface = ifaces.nextElement(); for (Enumeration<InetAddress> inetAddrs = iface.getInetAddresses(); inetAddrs.hasMoreElements();) { InetAddress inetAddr = inetAddrs.nextElement(); if (!inetAddr.isLoopbackAddress() && inetAddr.isSiteLocalAddress()) { ipaddress = inetAddr.getHostAddress(); break; } } } } else { LOG.warn("Local Host don't have any associated IP address"); } } catch (SocketException e) { LOG.warn("Exception while fetching local host ip address ",e); } return ipaddress; } private  SouthboundUtil(); static Optional<OvsdbNodeAugmentation> getManagingNode(DataBroker db, OvsdbBridgeAttributes mn); static Optional<D> readNode(ReadWriteTransaction transaction,
        InstanceIdentifier<D> connectionIid); static Optional<D> readNode(ReadTransaction transaction,
                                                              InstanceIdentifier<D> connectionIid); static String getControllerTarget(Node ovsdbNode); static String connectionInfoToString(final ConnectionInfo connectionInfo); static void schemaMismatchLog(String column, String table, SchemaVersionMismatchException ex); static PortExternalIds createExternalIdsForPort(String key, String value); static InterfaceExternalIds createExternalIdsForInterface(String key, String value); static InterfaceExternalIds interfaceCreatedByOpenDaylight(); static PortExternalIds portCreatedByOpenDaylight(); @SuppressWarnings("checkstyle:IllegalCatch") static String getOvsdbNodeId(InstanceIdentifier<Node> nodeIid); static String getBridgeNameFromOvsdbNodeId(InstanceIdentifier<Node> nodeIid);  }### Answer:
@Test public void testGetLocalControllerHostIpAddress() throws Exception { PowerMockito.mockStatic(NetworkInterface.class); when(NetworkInterface.getNetworkInterfaces()).thenReturn(null); assertNull(SouthboundUtil.getLocalControllerHostIpAddress()); InetAddress inetAddr = mock(InetAddress.class); when(inetAddr.isLoopbackAddress()).thenReturn(false); when(inetAddr.isSiteLocalAddress()).thenReturn(true); when(inetAddr.getHostAddress()).thenReturn("HostAddress"); NetworkInterface iface = PowerMockito.mock(NetworkInterface.class); when(iface.getInetAddresses()).thenReturn(Iterators.asEnumeration( Iterators.singletonIterator(inetAddr))); when(NetworkInterface.getNetworkInterfaces()).thenReturn(Iterators.asEnumeration( Iterators.singletonIterator(iface))); assertEquals("HostAddress", SouthboundUtil.getLocalControllerHostIpAddress()); }