ClientAuthenticationDelegate extends Delegate { @Override public void applyDelegate(Config config) { if (clientAuthentication != null) { config.setClientAuthentication(clientAuthentication); } } ClientAuthenticationDelegate(); Boolean isClientAuthentication(); void setClientAuthentication(boolean clientAuthentication); @Override void applyDelegate(Config config);  }
@Test public void testApplyDelegate() { Config config = Config.createConfig(); config.setClientAuthentication(false); args = new String[1]; args[0] = "-client_authentication"; jcommander.parse(args); delegate.applyDelegate(config); assertTrue(config.isClientAuthentication()); }
@Test public void testNothingSetNothingChanges() { Config config = Config.createConfig(); Config config2 = Config.createConfig(); delegate.applyDelegate(config); assertTrue(EqualsBuilder.reflectionEquals(config, config2, "keyStore", "ourCertificate")); }