SignatureValue implements Serializable { @Override public String toString() { return "SignatureValue [algorithm=" + algorithm + ", value=" + ((value != null) ? Base64.getEncoder().encodeToString(value) : null) + "]"; } SignatureValue();  SignatureValue(SignatureAlgorithm algorithm, byte[] value); SignatureAlgorithm getAlgorithm(); void setAlgorithm(SignatureAlgorithm algorithm); byte[] getValue(); void setValue(byte[] value); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testToString() { SignatureValue sv = new SignatureValue(); LOG.info("{}", sv); assertEquals("SignatureValue [algorithm=null, value=null]", sv.toString()); sv.setAlgorithm(SignatureAlgorithm.RSA_SSA_PSS_SHA224_MGF1); sv.setValue(new byte[] { 1, 2, 3 }); LOG.info("{}", sv); assertEquals("SignatureValue [algorithm=RSA_SSA_PSS_SHA224_MGF1, value=AQID]", sv.toString()); }