CertificateDelegate extends Delegate { public String getPassword() { return password; } CertificateDelegate(); String getKeystore(); void setKeystore(String keystore); String getPassword(); void setPassword(String password); String getAlias(); void setAlias(String alias); String getCertificate(); void setCertificate(String certificate); String getKey(); void setKey(String key); @Override void applyDelegate(Config config);  }
@Test public void testGetPassword() { args = new String[2]; args[0] = "-password"; args[1] = "testpassword"; jcommander.parse(args); assertTrue("Password parameter gets not parsed correctly", delegate.getPassword().equals(args[1])); }