SignatureAndHashAlgorithmDelegate extends Delegate { public List<SignatureAndHashAlgorithm> getSignatureAndHashAlgorithms() { if (signatureAndHashAlgorithms == null) { return null; } return Collections.unmodifiableList(signatureAndHashAlgorithms); } SignatureAndHashAlgorithmDelegate(); List<SignatureAndHashAlgorithm> getSignatureAndHashAlgorithms(); void setSignatureAndHashAlgorithms(List<SignatureAndHashAlgorithm> signatureAndHashAlgorithms); @Override void applyDelegate(Config config);  }
@Test public void testGetSignatureAndHashAlgorithms() { args = new String[2]; args[0] = "-signature_hash_algo"; args[1] = "RSA_SHA512,DSA_SHA512"; delegate.setSignatureAndHashAlgorithms(null); jcommander.parse(args); assertTrue(delegate.getSignatureAndHashAlgorithms().contains(SignatureAndHashAlgorithm.RSA_SHA512)); assertTrue(delegate.getSignatureAndHashAlgorithms().contains(SignatureAndHashAlgorithm.DSA_SHA512)); }