SendDynamicServerCertificateAction extends MessageAction implements SendingAction { @Override public String toString() { StringBuilder sb; if (isExecuted()) { sb = new StringBuilder("Send Dynamic Certificate Action:\n"); } else { sb = new StringBuilder("Send Dynamic Certificate: (not executed)\n"); } sb.append("\tMessages:"); if (messages != null) { for (ProtocolMessage message : messages) { sb.append(message.toCompactString()); sb.append(", "); } sb.append("\n"); } else { sb.append("null (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 testToString() { assertTrue(action.toString().equals("Send Dynamic Certificate: (not executed)\n\tMessages:\n")); action.execute(state); assertTrue(action.toString().equals("Send Dynamic Certificate Action:\n\tMessages:CERTIFICATE, \n")); }