SendDynamicServerCertificateAction extends MessageAction implements SendingAction { @Override public String toCompactString() { StringBuilder sb = new StringBuilder(super.toCompactString()); if ((messages != null) && (!messages.isEmpty())) { sb.append(" ("); for (ProtocolMessage message : messages) { sb.append(message.toCompactString()); sb.append(","); } sb.deleteCharAt(sb.lastIndexOf(",")).append(")"); } else { sb.append(" (no messages set)"); } return sb.toString(); } SendDynamicServerCertificateAction();  SendDynamicServerCertificateAction(String connectionAlias); @Override void execute(State state); @Override String toString(); @Override String toCompactString(); @Override boolean executedAsPlanned(); @Override void setRecords(List<AbstractRecord> records); @Override void reset(); @Override List<ProtocolMessage> getSendMessages(); @Override List<AbstractRecord> getSendRecords(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testToCompactString() { assertTrue(action.toCompactString().equals("SendDynamicServerCertificateAction [server] (no messages set)")); action.execute(state); assertTrue(action.toCompactString().equals("SendDynamicServerCertificateAction [server] (CERTIFICATE)")); }