GeneralDelegate extends Delegate { public boolean isHelp() { return help; } GeneralDelegate(); boolean isHelp(); void setHelp(boolean help); boolean isDebug(); void setDebug(boolean debug); boolean isQuiet(); void setQuiet(boolean quiet); String getKeylogfile(); void setKeylogfile(String keylogfile); @Override void applyDelegate(Config config);  }
@Test public void testIsHelp() { args = new String[1]; args[0] = "-help"; assertFalse(delegate.isHelp()); jcommander.parse(args); assertTrue(delegate.isHelp()); delegate = new GeneralDelegate(); args[0] = "-h"; jcommander = new JCommander(delegate); jcommander.parse(args); assertTrue(delegate.isHelp()); }