### Question:
OcsInterfaceUtils extends InterfaceUtils { public Network selectManagementNetwork(Computer computer) { List<Network> possibleNetworks = new ArrayList<>(); for (Network network : computer.getNetworks()) { if (isIpWhiteListed(network.getIPAddress())) { LOGGER.debug("Match White for: " + computer.getHardware().getName() + "\t" + network.getIPAddress()); return network; } else if (!isIpBlackListed(network.getIPAddress())) { possibleNetworks.add(network); } } if (possibleNetworks.isEmpty()) { if (isIpBlackListed(computer.getHardware().getIpaddr())) { return null; } else { Network dummyNetwork = new Network(); dummyNetwork.setIPAddress(computer.getHardware().getIpaddr()); LOGGER.debug("Match dummy for: " + computer.getHardware().getName() + "\t" + dummyNetwork.getIPAddress()); return dummyNetwork; } } else { LOGGER.debug("Use any for: " + computer.getHardware().getName() + "\t" + possibleNetworks.get(0).getIPAddress()); return possibleNetworks.get(0); } } OcsInterfaceUtils(final InstanceConfiguration config); Network selectManagementNetworkWhiteAndBlackOnly(Computer computer); String selectIpAddressWhiteAndBlackOnly(SnmpDevice snmpDevice); String selectIpAddress(SnmpDevice snmpDevice); Network selectManagementNetwork(Computer computer); List<RequisitionCategory> populateCategories(Computer myComputer, InstanceConfiguration config, String instance); List<RequisitionAsset> populateAssets(Computer myComputer, InstanceConfiguration config, String instance);  }### Answer:
@Test public void selectManagementNetworkTest() { assertNotNull(helper.selectManagementNetwork(computerWhite)); assertEquals(IP_WHITE, helper.selectManagementNetwork(computerWhite).getIPAddress()); assertNotNull(helper.selectManagementNetwork(computerDefault)); assertEquals(IP_DEFAULT, helper.selectManagementNetwork(computerDefault).getIPAddress()); assertNull(helper.selectManagementNetwork(computerBlack)); assertNotNull(helper.selectManagementNetwork(computerDefaultWhite)); assertEquals(IP_WHITE, helper.selectManagementNetwork(computerDefaultWhite).getIPAddress()); assertNotNull(helper.selectManagementNetwork(computerDefaultBlack)); assertEquals(IP_DEFAULT, helper.selectManagementNetwork(computerDefaultBlack).getIPAddress()); assertNotNull(helper.selectManagementNetwork(computerBlackWhite)); assertEquals(IP_WHITE, helper.selectManagementNetwork(computerBlackWhite).getIPAddress()); assertNotNull(helper.selectManagementNetwork(computerDefaultBlackWhite)); assertEquals(IP_WHITE, helper.selectManagementNetwork(computerDefaultBlackWhite).getIPAddress()); }