### Question:
DaemonConfiguration { public void setDaemonAddress(String socketAddress) { String environmentAddress = System.getenv(DAEMON_ADDRESS_ENVIRONMENT_VARIABLE_KEY); String systemAddress = System.getProperty(DAEMON_ADDRESS_SYSTEM_PROPERTY_KEY); if (StringValidator.isNullOrBlank(environmentAddress) && StringValidator.isNullOrBlank(systemAddress)) { setUDPAndTCPAddress(socketAddress, false); } else { logger.info(String.format("Ignoring call to setDaemonAddress as one of %s or %s is set.", DAEMON_ADDRESS_ENVIRONMENT_VARIABLE_KEY, DAEMON_ADDRESS_SYSTEM_PROPERTY_KEY)); } } @SuppressWarnings("nullness:method.invocation.invalid")  DaemonConfiguration(); void setDaemonAddress(String socketAddress); boolean setUDPAndTCPAddress(@Nullable String addr); void setTCPAddress(String addr); String getTCPAddress(); void setUDPAddress(String addr); String getUDPAddress(); InetSocketAddress getAddressForEmitter(); String getEndpointForTCPConnection(); static final String DAEMON_ADDRESS_ENVIRONMENT_VARIABLE_KEY; static final String DAEMON_ADDRESS_SYSTEM_PROPERTY_KEY; @Deprecated
    public InetSocketAddress address; }### Answer:
@Test public void testDaemonAddressSystemPropertyOverridesRuntimeConfig() { System.setProperty(DaemonConfiguration.DAEMON_ADDRESS_SYSTEM_PROPERTY_KEY, "1.2.3.4:5"); DaemonConfiguration config = new DaemonConfiguration(); config.setDaemonAddress("6.7.8.9:10"); }
@Test(expected = IllegalArgumentException.class) public void testShouldThrowOnInvalidRuntimeConfig() { DaemonConfiguration config = new DaemonConfiguration(); config.setDaemonAddress("0.0.0.1"); }
@Test(expected = IllegalArgumentException.class) public void testShouldThrowOnReallyInvalidRuntimeConfig() { DaemonConfiguration config = new DaemonConfiguration(); config.setDaemonAddress("Not an address"); }