Configuration { public boolean isVerbose() { return verbose; } Configuration(String[] args);  Configuration(); boolean isVerbose(); void validate(); Mode getMode(); Protocol getProtocol(); String getLocalAddress(); InetAddress getLocalInetAddress(); Integer getLocalPort(); String getAddress(); InetAddress getInetAddress(); Integer getPort(); String getInterface(); NetworkInterface getNetworkInterface(); String getInterfaceName(); List<InterfaceAddress> getNetworkInterfaceAddresses(); InetAddress getNetworkInterfaceAddress(AddressType type); String getPayload(); @Override String toString(); void setAddress(String s); void setProtocol(Protocol p); void setMode(Mode m); void setNetworkInterface(NetworkInterface n); void setPort(Integer i); static final String VERBOSE_SYSTEM_PROPERTY_NAME; }
@Test public void notVerbose() throws Exception { Configuration c = new Configuration(); assertFalse(c.isVerbose()); }
@Test public void verbose() throws Exception { try { System.setProperty(Configuration.VERBOSE_SYSTEM_PROPERTY_NAME, "true"); Configuration c = new Configuration(); assertTrue(c.isVerbose()); } finally { System.clearProperty(Configuration.VERBOSE_SYSTEM_PROPERTY_NAME); } }