### Question:
OvsdbHelper { public static IpAddress getNodeIp(OvsdbNodeAugmentation ovsdbNode) { if (ovsdbNode.getConnectionInfo() != null) { return ovsdbNode.getConnectionInfo().getRemoteIp(); } return null; }  static OvsdbBridgeAugmentation getOvsdbBridgeFromTerminationPoint(
            InstanceIdentifier<OvsdbTerminationPointAugmentation> tpIid, DataBroker dataBroker); static Node getNodeFromBridgeRef(OvsdbBridgeRef bridgeRef, DataBroker dataBroker); static OvsdbTerminationPointAugmentation getOvsdbTerminationPoint(
            InstanceIdentifier<OvsdbTerminationPointAugmentation> tpIid, DataBroker dataBroker); static Node getNode(Node node, List<TerminationPoint> tps,
            OvsdbBridgeAugmentation ovsdbBridgeAugmentation); static OvsdbBridgeAugmentation buildOvsdbBridgeAugmentation(OvsdbBridgeAugmentation bridge,
            OvsdbNodeAugmentation ovsdbNode); static List<TerminationPoint> buildTerminationPoints(OvsdbBridgeAugmentation bridge,
            OvsdbTerminationPointAugmentation ovsdbTp, AbstractTunnelType tunnelType); static String generateTpName(OvsdbBridgeAugmentation bridge, AbstractTunnelType tunnelType); static OvsdbTerminationPointAugmentation buildOvsdbTerminationPointAugmentation(
            OvsdbBridgeAugmentation bridge, List<Options> options, AbstractTunnelType tunnelType); static void setOption(List<Options> options, String key, String value); static IpAddress getManagerIp(OvsdbNodeAugmentation ovsdbNode); static IpAddress getNodeIp(OvsdbNodeAugmentation ovsdbNode); static List<ControllerEntry> buildControllerEntries(IpAddress ip); static OvsdbNodeAugmentation getManagerNode(OvsdbBridgeAugmentation bridge, DataBroker dataBroker); static Node getTopologyNode(InstanceIdentifier<Node> nodeIid, DataBroker dataBroker); static void createTunnelPort(InstanceIdentifier<Node> nodeIid,
            Node node, AbstractTunnelType tunnelType, DataBroker dataBroker);  }### Answer:
@Test public void testGetNodeIp() { OvsdbNodeAugmentationBuilder nodeAugmentationBuilder = new OvsdbNodeAugmentationBuilder(); ConnectionInfoBuilder ciBuilder = new ConnectionInfoBuilder(); ciBuilder.setRemoteIp(new IpAddress(new Ipv4Address("192.168.50.10"))); nodeAugmentationBuilder.setConnectionInfo(ciBuilder.build()); IpAddress nodeIpAddress = OvsdbHelper.getNodeIp(nodeAugmentationBuilder.build()); assertNotNull(nodeIpAddress); assertEquals("192.168.50.10", nodeIpAddress.getIpv4Address().getValue()); }
@Test public void testGetNodeIp_IpNotSet() { OvsdbNodeAugmentationBuilder nodeAugmentationBuilder = new OvsdbNodeAugmentationBuilder(); nodeAugmentationBuilder.setConnectionInfo(new ConnectionInfoBuilder().build()); assertNull(OvsdbHelper.getNodeIp(nodeAugmentationBuilder.build())); }
@Test public void testGetNodeIp_ConnectionInfoNull() { assertNull(OvsdbHelper.getNodeIp(new OvsdbNodeAugmentationBuilder().build())); }