### Question:
DefaultBuilderConfig { static List<SocketAddress> getSeedAddress() { List<SocketAddress> seedAddresses = null; try { String s = conf.getString("netifi.client.seedAddresses"); if (s != null) { seedAddresses = new ArrayList<>(); String[] split = s.split(","); for (String a : split) { String[] split1 = a.split(":"); if (split1.length == 2) { String host = split1[0]; try { int port = Integer.parseInt(split1[1]); seedAddresses.add(InetSocketAddress.createUnresolved(host, port)); } catch (NumberFormatException fe) { throw new IllegalStateException("invalid seed address: " + a); } } else { throw new IllegalStateException("invalid seed address: " + a); } } } } catch (ConfigException.Missing m) { } return seedAddresses; } private  DefaultBuilderConfig();   }### Answer:
@Test(expected = IllegalStateException.class) public void testShouldThrowExceptionForAddressMissingPort() { System.setProperty("netifi.client.seedAddresses", "localhost:8001,localhost,localhost:8003"); List<SocketAddress> seedAddress = DefaultBuilderConfig.getSeedAddress(); }
@Test(expected = IllegalStateException.class) public void testShouldThrowExceptionForInvalidAddress() { System.setProperty("netifi.client.seedAddresses", "no way im valid"); List<SocketAddress> seedAddress = DefaultBuilderConfig.getSeedAddress(); }
@Test public void testShouldReturnNull() { List<SocketAddress> seedAddress = DefaultBuilderConfig.getSeedAddress(); Assert.assertNull(seedAddress); }